Page MenuHomePhabricator

Drop several views from ptwiki
Closed, ResolvedPublic

Description

In T211544, several tables were dropped. Should be reflected on cloud too.

See:

Event Timeline

Zoranzoki21 triaged this task as Medium priority.Dec 19 2018, 7:40 PM
Zoranzoki21 created this task.
bd808 moved this task from Backlog to Wiki replicas on the Data-Services board.Dec 27 2018, 1:12 AM

@bd808 Can you do this please, as previously for srwikinews?

Andrew closed this task as Resolved.Jan 2 2019, 8:47 PM
Andrew claimed this task.
Andrew added a subscriber: Andrew.

Done -- sorry for the delay.

Zoranzoki21 reopened this task as Open.Jan 2 2019, 8:50 PM

I no see this done..

Andrew reassigned this task from Andrew to Banyek.Jan 2 2019, 9:26 PM
Andrew added a subscriber: Banyek.

I did run that. I don't know why the _p tables aren't updating properly. Assigning to @Banyek to investigate.

Andrew renamed this task from Drop several views from ptwikipedia to Drop several views from ptwiki.Jan 3 2019, 3:33 PM
Banyek added a comment.Jan 3 2019, 3:46 PM

@Andrew as far as I know we manually have to drop the views as dropping the underlying tables doesn't clean them up. What shall I investigate exaclty?

Banyek added a comment.Jan 3 2019, 3:53 PM

Ok, I guess I understand the problem now, I'll check the scripts

Bstorm added a subscriber: Bstorm.Jan 4 2019, 3:54 AM

@Banyek The script has no real way to work with tables as written. It runs drop view and intentionally avoids changing any tables. Having the experimental materialized table there does break the logic there. This can be worked around if we choose to keep that materialized table around. I imagine we could also just remove the experimental table for now, though, right?

@Bstorm Yeah, that is the case, I just wanted to ping you about it in the ticket :)
So, I think I'll drop the materialized views (as their data is already outdated anyway) instead of modifying the script.
Do you agree?

@Banyek You can`t just login there and drop these views via DROP VIEW IF EXISTS?

MariaDB [ptwiki_p]> SHOW TABLES like 'flagged%';
+-------------------------------+
| Tables_in_ptwiki_p (flagged%) |
+-------------------------------+
| flaggedimages                 |
| flaggedpage_config            |
| flaggedpage_pending           |
| flaggedpages                  |
| flaggedrevs                   |
| flaggedrevs_promote           |
| flaggedrevs_statistics        |
| flaggedrevs_tracking          |
| flaggedtemplates              |
+-------------------------------+
9 rows in set (0.00 sec)

MariaDB [ptwiki_p]>
Banyek added a comment.Jan 8 2019, 1:33 PM

No, I didn't

Banyek added a comment.Jan 8 2019, 7:54 PM

@Banyek You can`t just login there and drop these views via DROP VIEW IF EXISTS?

MariaDB [ptwiki_p]> SHOW TABLES like 'flagged%';
+-------------------------------+
| Tables_in_ptwiki_p (flagged%) |
+-------------------------------+
| flaggedimages                 |
| flaggedpage_config            |
| flaggedpage_pending           |
| flaggedpages                  |
| flaggedrevs                   |
| flaggedrevs_promote           |
| flaggedrevs_statistics        |
| flaggedrevs_tracking          |
| flaggedtemplates              |
+-------------------------------+
9 rows in set (0.00 sec)
MariaDB [ptwiki_p]>

@Zoranzoki21 Sorry I misunderstood your question (I don't know how so, really) Sure I can drop those views!
But I'd like to fix the issue which blocks using the script. I'll solve thos one way or another tomorrow.

Banyek added a comment.Jan 8 2019, 8:16 PM

It seems I can clean up the materialized views tables which prevent the tool working correctly (see T210693) , so I guess this ticket will be solved right after. Thanks for patience

Banyek added a comment.Jan 9 2019, 9:54 AM

As the tables which blocked using the view management tool were cleaned up (T210693) , I think we could to the view updates normally.

Views should be dropped still.

Bstorm added a comment.Jan 9 2019, 3:36 PM

that's the view updates he means. Will run the update today.

Bstorm added a comment.Jan 9 2019, 3:50 PM

Running with the --clean option

2019-01-09 15:47:16,655 INFO cleanup is enabled
2019-01-09 15:47:16,658 INFO cleaning 12 tables
2019-01-09 15:47:16,658 INFO Dropping view ptwiki_p.flaggedrevs_statistics
2019-01-09 15:47:16,661 INFO Dropping view ptwiki_p.flaggedrevs_promote
2019-01-09 15:47:16,663 INFO Dropping view ptwiki_p.flaggedrevs_tracking
2019-01-09 15:47:16,664 INFO Dropping view ptwiki_p.tag_summary
2019-01-09 15:47:16,667 INFO Dropping view ptwiki_p.valid_tag
2019-01-09 15:47:16,670 INFO Dropping view ptwiki_p.flaggedpages
2019-01-09 15:47:16,672 INFO Dropping view ptwiki_p.flaggedpage_pending
2019-01-09 15:47:16,675 INFO Dropping view ptwiki_p.flaggedimages
2019-01-09 15:47:16,678 INFO Dropping view ptwiki_p.msg_resource_links
2019-01-09 15:47:16,680 INFO Dropping view ptwiki_p.flaggedrevs
2019-01-09 15:47:16,682 INFO Dropping view ptwiki_p.flaggedtemplates
2019-01-09 15:47:16,685 INFO Dropping view ptwiki_p.flaggedpage_config

All good on two replicas. Fighting one of them for a lock (labsdb1011). I might have to depool that one to finish.

Bstorm closed this task as Resolved.Jan 9 2019, 3:51 PM
Bstorm claimed this task.

Got the lock. This is done on all replica hosts.

[ptwiki_p]> SHOW TABLES like 'flagged%';
Empty set (0.00 sec)

Looks good, thanks @Bstorm