Page MenuHomePhabricator

Schema change for adding change_object_id index on wb_changes
Closed, ResolvedPublic

Description

Context: T291125: Make sure new access patterns of wb_changes table have proper indexes in place

  1. ALTERs to run: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/721893/1/repo/sql/mysql/archives/patch-wb_changes-change_object_id-index.sql
  2. Where to run those changes: Wikibase repos (wikidatawiki, testwikidatawiki, commonswiki, testcommonswiki). The table is empty on commons wikis.
  3. When to run those changes: By early October preferably
  4. If the schema change is backwards compatible: Yes
  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: Does it matter? This table is public.

Progress:

  • s3 (testwikidatawiki)
  • s4 (commonswiki, testcommonswiki)
  • s8 (wikidata)

Event Timeline

How urgent is this? We might not get to it till late October or early November

It's slightly urgent, it blocks deploying of a T48643 in production.

It's only on s8 though. The commons one is empty and the testwikidatawiki is so small probably can be done live.

yup:

wikiadmin@10.64.16.208(testwikidatawiki)> select count(*) from wb_changes limit 5;
+----------+
| count(*) |
+----------+
|        1 |
+----------+
1 row in set (0.001 sec)

So early October will be hard, I'm off on holidays from the 3rd to the 15th.
So maybe @Kormat can pick this up once she's back from holidays (3rd of October).
I will pass this info to @LSobanski once he's back as handover info.

The wikidatawiki table is pretty small too (2GB) on disk - should be doable in 1-2 days after being picked up:

+----------+
| count(*) |
+----------+
|   520053 |
+----------+
1 row in set (0.246 sec)

Mentioned in SAL (#wikimedia-operations) [2021-09-23T13:11:25Z] <marostegui> Deploy schema change on s3 testwikidatawiki.wb_changes T291584

Mentioned in SAL (#wikimedia-operations) [2021-09-23T13:14:24Z] <marostegui> Deploy schema change on s4 {commonswiki,testcommonswiki}.wb_changes T291584

Marostegui updated the task description. (Show Details)

I have talked to @Ladsgroup and there's no reason to wait till October, so I am trying to get this done between this week (I am on clinic duty though) and next week, so I can leave it done before going on holidays.

Mentioned in SAL (#wikimedia-operations) [2021-09-23T13:28:11Z] <marostegui> Deploy schema change on s8 codfw wikidatawiki.wb_changes T291584

s8 eqiad

  • dbstore1005
  • db1178
  • db1177
  • db1172
  • db1171
  • db1167
  • db1154
  • db1126
  • db1116
  • db1114
  • db1111
  • db1109
  • db1104
  • db1101
  • db1099
  • clouddb1021
  • clouddb1020
  • clouddb1016

Mentioned in SAL (#wikimedia-operations) [2021-09-24T05:07:39Z] <marostegui@cumin1001> dbctl commit (dc=all): 'Depool db1177 T291584', diff saved to https://phabricator.wikimedia.org/P17319 and previous config saved to /var/cache/conftool/dbconfig/20210924-050739-marostegui.json

Got this on db1177: ERROR 1712 (HY000) at line 2: Index wb_changes_change_revision_id is corrupted
Going to fix it.

Mentioned in SAL (#wikimedia-operations) [2021-09-24T05:10:51Z] <marostegui@cumin1001> dbctl commit (dc=all): 'db1177 (re)pooling @ 10%: After fixing some indexes T291584', diff saved to https://phabricator.wikimedia.org/P17320 and previous config saved to /var/cache/conftool/dbconfig/20210924-051050-root.json

Mentioned in SAL (#wikimedia-operations) [2021-09-24T05:25:54Z] <marostegui@cumin1001> dbctl commit (dc=all): 'db1177 (re)pooling @ 25%: After fixing some indexes T291584', diff saved to https://phabricator.wikimedia.org/P17321 and previous config saved to /var/cache/conftool/dbconfig/20210924-052554-root.json

Mentioned in SAL (#wikimedia-operations) [2021-09-24T05:40:58Z] <marostegui@cumin1001> dbctl commit (dc=all): 'db1177 (re)pooling @ 50%: After fixing some indexes T291584', diff saved to https://phabricator.wikimedia.org/P17322 and previous config saved to /var/cache/conftool/dbconfig/20210924-054057-root.json

Mentioned in SAL (#wikimedia-operations) [2021-09-24T05:56:02Z] <marostegui@cumin1001> dbctl commit (dc=all): 'db1177 (re)pooling @ 75%: After fixing some indexes T291584', diff saved to https://phabricator.wikimedia.org/P17323 and previous config saved to /var/cache/conftool/dbconfig/20210924-055601-root.json

Mentioned in SAL (#wikimedia-operations) [2021-09-24T06:11:05Z] <marostegui@cumin1001> dbctl commit (dc=all): 'db1177 (re)pooling @ 100%: After fixing some indexes T291584', diff saved to https://phabricator.wikimedia.org/P17324 and previous config saved to /var/cache/conftool/dbconfig/20210924-061105-root.json

Marostegui claimed this task.
Marostegui updated the task description. (Show Details)
Marostegui added a project: DBA.

All done