While troubleshooting T205904 we found that there is a patch that was merged 9 years ago but never got deployed in production: https://github.com/wikimedia/mediawiki/blob/master/maintenance/archives/patch-change_tag-indexes.sql
That touches a few things, but for now, we are going to focus on the change_tag table as we are doing some work already with it: T203709
The following indexes are now redudant:
UNIQUE KEY `ct_rc_id` (`ct_rc_id`,`ct_tag`), UNIQUE KEY `ct_log_id` (`ct_log_id`,`ct_tag`), UNIQUE KEY `ct_rev_id` (`ct_rev_id`,`ct_tag`), KEY `ct_tag` (`ct_tag`,`ct_rc_id`,`ct_rev_id`,`ct_log_id`), KEY `change_tag_rc_tag_nonuniq` (`ct_rc_id`,`ct_tag`), KEY `change_tag_log_tag_nonuniq` (`ct_log_id`,`ct_tag`), KEY `change_tag_rev_tag_nonuniq` (`ct_rev_id`,`ct_tag`) KEY `change_tag_tag_id` (`ct_tag`,`ct_rc_id`,`ct_rev_id`,`ct_log_id`),
So we need to drop them:
DROP INDEX ct_rc_id ON /*_*/change_tag; DROP INDEX ct_log_id ON /*_*/change_tag; DROP INDEX ct_rev_id ON /*_*/change_tag; DROP INDEX ct_tag ON /*_*/change_tag;
ct_tag exists on some hosts, and not on others, so maybe that one was deployed. Who knows what happened 9 years ago.
This needs to be dropped in eqiad first, and once we are back in eqiad, finish it on codfw:
s1
- eqiad T205913#4633000
- codfw T205913#4633000
s2
- eqiad
- codfw
s3
- eqiad (only a few wikis needed it)
- codfw
s4
- eqiad
- codfw
s5
- eqiad
- codfw
s6
- eqiad
- codfw
s7
- eqiad
- codfw
s8 - not needed T205913#4631293
labswiki (wikitech) - not needed T205913#4631293