Page MenuHomePhabricator

Schema change for renaming new_name_timestamp to rc_new_name_timestamp in recentchanges
Closed, ResolvedPublic

Description

Part of T270033: Fix and enforce table prefix usage in columns and indexes in core

  1. ALTERs to run: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/667358/4/maintenance/archives/patch-recentchanges-rc_new_name_timestamp.sql
  2. Where to run those changes: all.dblist
  3. When to run those changes: After 1.36-wmf.34 is deployed everywhere (Monday 15 March)
  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: Yes, data in this table is public

Progress

Event Timeline

Marostegui triaged this task as Medium priority.Mar 3 2021, 5:35 AM
Marostegui added a project: DBA.
Marostegui moved this task from Triage to Ready on the DBA board.

@Ladsgroup this can be deployed?
As always with indexes renames, I would deploy this change to a host in s6 eqiad, and leave it a few days running to see if we get query errors (some queries doing FORCE index or similar).

@Ladsgroup I have altered db1096:3316 and will leave it running for a few days, to make sure we have no code forcing the old index:

# mysql.py -hdb1096:3316 frwiki -e "show create table recentchanges\G"
*************************** 1. row ***************************
       Table: recentchanges
Create Table: CREATE TABLE `recentchanges` (
  `rc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rc_timestamp` binary(14) NOT NULL,
  `rc_actor` bigint(20) unsigned NOT NULL,
  `rc_namespace` int(11) NOT NULL DEFAULT 0,
  `rc_title` varbinary(255) NOT NULL DEFAULT '',
  `rc_comment_id` bigint(20) unsigned NOT NULL,
  `rc_minor` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `rc_bot` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `rc_new` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `rc_cur_id` int(10) unsigned NOT NULL DEFAULT 0,
  `rc_this_oldid` int(10) unsigned NOT NULL DEFAULT 0,
  `rc_last_oldid` int(10) unsigned NOT NULL DEFAULT 0,
  `rc_type` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `rc_source` varbinary(16) NOT NULL DEFAULT '',
  `rc_patrolled` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `rc_ip` varbinary(40) NOT NULL DEFAULT '',
  `rc_old_len` int(10) DEFAULT NULL,
  `rc_new_len` int(10) DEFAULT NULL,
  `rc_deleted` tinyint(1) unsigned NOT NULL DEFAULT 0,
  `rc_logid` int(10) unsigned NOT NULL DEFAULT 0,
  `rc_log_type` varbinary(255) DEFAULT NULL,
  `rc_log_action` varbinary(255) DEFAULT NULL,
  `rc_params` blob DEFAULT NULL,
  PRIMARY KEY (`rc_id`),
  KEY `rc_timestamp` (`rc_timestamp`),
  KEY `rc_cur_id` (`rc_cur_id`),
  KEY `rc_ip` (`rc_ip`),
  KEY `rc_name_type_patrolled_timestamp` (`rc_namespace`,`rc_type`,`rc_patrolled`,`rc_timestamp`),
  KEY `rc_ns_actor` (`rc_namespace`,`rc_actor`),
  KEY `rc_actor` (`rc_actor`,`rc_timestamp`),
  KEY `rc_namespace_title_timestamp` (`rc_namespace`,`rc_title`,`rc_timestamp`),
  KEY `rc_this_oldid` (`rc_this_oldid`),
  KEY `rc_new_name_timestamp` (`rc_new`,`rc_namespace`,`rc_timestamp`)
) ENGINE=InnoDB AUTO_INCREMENT=438991179 DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8

This is on: frwiki jawiki ruwiki

s6 progress

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1005
  • db2141
  • db2129
  • db2124
  • db2117
  • db2114
  • db2097
  • db2095
  • db2089
  • db2087
  • db2076
  • db1180
  • db1173
  • db1168
  • db1165
  • db1155
  • db1140
  • db1139
  • db1131
  • db1125
  • db1113
  • db1098
  • db1096
  • db1085
  • clouddb1021
  • clouddb1019
  • clouddb1015

I am not seeing any errors coming from any index force or related, I will wait till Monday though before proceeding

s5 eqiad progress

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1003
  • db1161
  • db1154
  • db1150
  • db1145
  • db1144
  • db1130
  • db1124
  • db1113
  • db1110
  • db1100
  • db1096
  • db1082
  • clouddb1021
  • clouddb1020
  • clouddb1016

s2 eqiad progress

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1004
  • db1182
  • db1171
  • db1170
  • db1162
  • db1156
  • db1155
  • db1146
  • db1129
  • db1125
  • db1122
  • db1105
  • db1074
  • clouddb1021
  • clouddb1018
  • clouddb1014

s8 eqiad progress

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1005
  • db1177
  • db1172
  • db1154
  • db1126
  • db1116
  • db1114
  • db1111
  • db1109
  • db1104
  • db1101
  • db1099
  • db1087
  • clouddb1021
  • clouddb1020
  • clouddb1016

s1 eqiad

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1003
  • db1184
  • db1169
  • db1164
  • db1163
  • db1154
  • db1140
  • db1139
  • db1135
  • db1134
  • db1133
  • db1119
  • db1118
  • db1106
  • db1105
  • db1099
  • db1083
  • clouddb1021
  • clouddb1017
  • clouddb1013

s1 is just waiting for the master, which will be done once the switchover on Wednesday is done (T278214)

Mentioned in SAL (#wikimedia-operations) [2021-04-26T10:25:10Z] <marostegui> Deploy schema change on s4 codfw, lag will appear T276292

s4 progress

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1004
  • db1160
  • db1155
  • db1150
  • db1149
  • db1148
  • db1147
  • db1146
  • db1145
  • db1144
  • db1143
  • db1142
  • db1141
  • db1138
  • db1121
  • clouddb1021
  • clouddb1019
  • clouddb1015

s7 eqiad

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1003
  • db1181
  • db1174
  • db1170
  • db1158
  • db1155
  • db1136
  • db1127
  • db1124
  • db1116
  • db1101
  • db1098
  • db1079
  • clouddb1021
  • clouddb1018
  • clouddb1014

s3 eqiad

  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1004
  • db1179
  • db1175
  • db1171
  • db1166
  • db1157
  • db1154
  • db1123
  • db1112
  • clouddb1021
  • clouddb1017
  • clouddb1013
Marostegui updated the task description. (Show Details)

Change 685607 had a related patch set uploaded (by Ammarpad; author: Ammarpad):

[mediawiki/core@master] Use `rc_new_name_timestamp` index name unconditionally

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

Change 685607 merged by jenkins-bot:

[mediawiki/core@master] Use `rc_new_name_timestamp` index name unconditionally

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