Page MenuHomePhabricator

Drop several views from ptwiki
Closed, ResolvedPublic

Description

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

See:

image.png (768×1 px, 157 KB)

Event Timeline

Kizule triaged this task as Medium priority.Dec 19 2018, 7:40 PM
Kizule created this task.

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

Andrew claimed this task.
Andrew subscribed.

Done -- sorry for the delay.

I no see this done..

image.png (768×1 px, 120 KB)

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

@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?

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

@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]>
In T212333#4856663, @Zoranzoki21 wrote:

@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.

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

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.

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

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 claimed this task.

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

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