Page MenuHomePhabricator

Drop tag_summary table
Closed, ResolvedPublic

Description

The day has come. We now can drop this table in favor of change_tag table.

  1. SQL to run: DROP TABLE tag_summary (https://gerrit.wikimedia.org/r/#/c/479266/)
  2. Where to run those changes: all.dblist
  3. When to run those changes: any time would work
  4. If the schema change is backwards compatible: No.
  5. If the schema change has been tested already on some of the test/beta wikis: Tested in beta cluster
  6. if the data should be made available on the labs replicas and/or dumps: No

Deletion progress:

wikitech

  • labswiki
  • labtestwiki

Event Timeline

Ladsgroup triaged this task as Medium priority.Dec 18 2018, 9:08 PM
Ladsgroup created this task.

Change 480590 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[operations/puppet@production] Drop valid_tag and tag_summary from labs replicas

https://gerrit.wikimedia.org/r/480590

Marostegui moved this task from Triage to Pending comment on the DBA board.

As this has been a very active table, I will start by renaming and will leave it for a long time. Even if there are no writes, we _really_ need to make sure nothing reads from it

Change 480590 merged by Bstorm:
[operations/puppet@production] Drop valid_tag and tag_summary from labs replicas

https://gerrit.wikimedia.org/r/480590

Marostegui changed the task status from Open to Stalled.Dec 20 2018, 12:19 PM

Stalling until wmf.9 is deployed everywhere: https://tools.wmflabs.org/versions/

Ladsgroup changed the task status from Stalled to Open.Jan 2 2019, 4:10 PM

wmf.9 is everywhere \o/

Mentioned in SAL (#wikimedia-operations) [2019-01-09T18:19:53Z] <marostegui> Rename table tag_summary on enwiki on db1089 - T212255

I have renamed tag_summary on enwiki on db1089:

root@db1089.eqiad.wmnet[enwiki]> set session sql_log_bin=0; rename table tag_summary to T212255_tag_summary;
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

I double checked on other slaves and on labs, and all the tables across all wikis were last modified on 20th Dec, so that means no more writes arrived ever since.
I have renamed the table on db1089 and will leave it for a few days while monitoring logtash to see that nothing really reads from it. Once that is confirmed I will start the dropping process.

If the above change needs to be reverted, this is what should be executed on db1089

set session sql_log_bin=0; rename table T212255_tag_summary to tag_summary;

I have seen no errors so far. So tomorrow I will rename the table on a wikidata server (as in wikidata is where the table is bigger in size) and leave it renamed on those two servers (1 enwiki, 1 wikidata) until Monday. If no errors arise, next week I will start nuking it everywhere!

@Ladsgroup I just realised that a wiki that was created the 4th of January (T197616#4859783 s4 - testcommonswiki) has the tag_summary table even if your change was merged the 18th of Dec (https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/479266/)

How is that possible?
Just asking because that looks weird and I don't want to start killing the table without being 100% sure ;-)

The interesting part is that it doesn't have valid_tag table but it does have tag_summary and the patch https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/479266/ contains the drop for both of them

root@db1068.eqiad.wmnet[testcommonswiki]> show tables like 'tag_sum%'; show tables like 'valid_t%';
+--------------------------------------+
| Tables_in_testcommonswiki (tag_sum%) |
+--------------------------------------+
| tag_summary                          |
+--------------------------------------+
1 row in set (0.00 sec)

Empty set (0.00 sec)

root@db1068.eqiad.wmnet[testcommonswiki]>

The reason being is that dropping tag_summary wasn't made it to wmf.9 (here). I think the reason valid_tag doesn't exist is that you dropped it several days ago.

Let me elaborate more why I said we should drop it after wmf.9 is everywhere (T212255#4849367). It was because the patch that stops writing to the table was made it to the branch cut (wmf.9) but the patch to actually drop the table didn't.

Thanks for the explanation! That makes sense :-)
All clear now!

Mentioned in SAL (#wikimedia-operations) [2019-01-14T14:57:49Z] <marostegui> Drop table tag_summary from s6 - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-15T07:20:29Z] <marostegui> Drop tag_summary from s5 - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-15T07:28:16Z] <marostegui> Drop tag_summary from wikitech - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-16T07:27:02Z] <marostegui> Drop table tag_summary from s2 - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-16T08:24:31Z] <marostegui> Drop table tag_summary from s4 - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-17T08:28:26Z] <marostegui> Drop table tag_summary from enwiki - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-18T06:54:39Z] <marostegui> Drop table tag_summary from s7 - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-21T06:08:59Z] <marostegui> tag_summary table from s8 - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-21T06:12:26Z] <marostegui> Drop tag_summary table from s3 codfw - T212255

s3 progress:

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1002
  • db1124
  • db1123
  • db1095
  • db1075
  • db1077
  • db1078

Mentioned in SAL (#wikimedia-operations) [2019-01-21T06:27:39Z] <marostegui> Drop tag_summary table from dbstore1002:s3 - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-21T06:32:35Z] <marostegui> Drop tag_summary table from db1095:3313 - T212255

Mentioned in SAL (#wikimedia-operations) [2019-01-21T06:47:43Z] <marostegui> Drop tag_summary table from db1023, db1077, db1075 and db1078 T212255

Marostegui updated the task description. (Show Details)
Marostegui updated the task description. (Show Details)

Dropped everywhere!