The report gives a long list of drifts (raw report below).
A db in master has indexes like this (my localhost):
MariaDB [client]> show indexes from page_restrictions; +-------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +-------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | page_restrictions | 0 | PRIMARY | 1 | pr_id | A | 0 | NULL | NULL | | BTREE | | | | page_restrictions | 0 | pr_pagetype | 1 | pr_page | A | 0 | NULL | NULL | | BTREE | | | | page_restrictions | 0 | pr_pagetype | 2 | pr_type | A | 0 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_typelevel | 1 | pr_type | A | 0 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_typelevel | 2 | pr_level | A | 0 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_level | 1 | pr_level | A | 0 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_cascade | 1 | pr_cascade | A | 0 | NULL | NULL | | BTREE | | | +-------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ 7 rows in set (0.001 sec)
In production, it's like this:
wikiadmin@10.64.0.214(enwiki)> show indexes from page_restrictions; +-------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +-------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | page_restrictions | 0 | PRIMARY | 1 | pr_page | A | 142725 | NULL | NULL | | BTREE | | | | page_restrictions | 0 | PRIMARY | 2 | pr_type | A | 142725 | NULL | NULL | | BTREE | | | | page_restrictions | 0 | pr_id | 1 | pr_id | A | 142725 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_page | 1 | pr_page | A | 142725 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_typelevel | 1 | pr_type | A | 4 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_typelevel | 2 | pr_level | A | 18 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_level | 1 | pr_level | A | 6 | NULL | NULL | | BTREE | | | | page_restrictions | 1 | pr_cascade | 1 | pr_cascade | A | 2 | NULL | NULL | | BTREE | | | +-------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ 8 rows in set (0.00 sec)
(It's not like this everywhere, s8 doesn't have this issue)
From what I understand it's the issue of PK not being pr_id but being pr_page, pr_type instead (and pr_page,pr_type should have its own unique index named pr_pagetype)
The raw report:
"page_restrictions pr_id index-mismatch-prod-extra": { "s1": [ "db1083.eqiad.wmnet", "db1106.eqiad.wmnet", "db1105.eqiad.wmnet", "db1119.eqiad.wmnet", "db1089.eqiad.wmnet", "db1107.eqiad.wmnet", "db1099.eqiad.wmnet", "db1118.eqiad.wmnet", "db1134.eqiad.wmnet", "db1091.eqiad.wmnet" ], "s2": [ "db1122.eqiad.wmnet", "db1129.eqiad.wmnet", "db1090.eqiad.wmnet", "db1074.eqiad.wmnet", "db1146.eqiad.wmnet", "db1076.eqiad.wmnet", "db1105.eqiad.wmnet" ], "s3": [ "db1123.eqiad.wmnet", "db1078.eqiad.wmnet", "db1112.eqiad.wmnet", "db1075.eqiad.wmnet" ], "s4": [ "db1081.eqiad.wmnet", "db1084.eqiad.wmnet", "db1141.eqiad.wmnet", "db1146.eqiad.wmnet", "db1121.eqiad.wmnet", "db1138.eqiad.wmnet", "db1143.eqiad.wmnet", "db1142.eqiad.wmnet", "db1144.eqiad.wmnet", "db1147.eqiad.wmnet", "db1148.eqiad.wmnet", "db1149.eqiad.wmnet" ], "s5": [ "db1100.eqiad.wmnet", "db1144.eqiad.wmnet", "db1113.eqiad.wmnet", "db1096.eqiad.wmnet", "db1130.eqiad.wmnet", "db1082.eqiad.wmnet", "db1110.eqiad.wmnet" ], "s6": [ "db1131.eqiad.wmnet", "db1088.eqiad.wmnet", "db1098.eqiad.wmnet", "db1096.eqiad.wmnet", "db1113.eqiad.wmnet", "db1093.eqiad.wmnet" ], "s7": [ "db1086.eqiad.wmnet", "db1094.eqiad.wmnet", "db1079.eqiad.wmnet", "db1090.eqiad.wmnet", "db1136.eqiad.wmnet", "db1127.eqiad.wmnet", "db1101.eqiad.wmnet", "db1098.eqiad.wmnet" ] }, "page_restrictions pr_page index-mismatch-prod-extra": { "s1": [ "db1083.eqiad.wmnet", "db1106.eqiad.wmnet", "db1105.eqiad.wmnet", "db1119.eqiad.wmnet", "db1089.eqiad.wmnet", "db1107.eqiad.wmnet", "db1099.eqiad.wmnet", "db1118.eqiad.wmnet", "db1134.eqiad.wmnet", "db1091.eqiad.wmnet" ], "s2": [ "db1122.eqiad.wmnet", "db1129.eqiad.wmnet", "db1090.eqiad.wmnet", "db1074.eqiad.wmnet", "db1146.eqiad.wmnet", "db1076.eqiad.wmnet", "db1105.eqiad.wmnet" ], "s3": [ "db1123.eqiad.wmnet", "db1078.eqiad.wmnet", "db1112.eqiad.wmnet", "db1075.eqiad.wmnet" ], "s4": [ "db1081.eqiad.wmnet", "db1084.eqiad.wmnet", "db1141.eqiad.wmnet", "db1146.eqiad.wmnet", "db1121.eqiad.wmnet", "db1138.eqiad.wmnet", "db1143.eqiad.wmnet", "db1142.eqiad.wmnet", "db1144.eqiad.wmnet", "db1147.eqiad.wmnet", "db1148.eqiad.wmnet", "db1149.eqiad.wmnet" ], "s5": [ "db1100.eqiad.wmnet", "db1144.eqiad.wmnet", "db1113.eqiad.wmnet", "db1096.eqiad.wmnet", "db1130.eqiad.wmnet", "db1082.eqiad.wmnet", "db1110.eqiad.wmnet" ], "s6": [ "db1131.eqiad.wmnet", "db1088.eqiad.wmnet", "db1098.eqiad.wmnet", "db1096.eqiad.wmnet", "db1113.eqiad.wmnet", "db1093.eqiad.wmnet" ], "s7": [ "db1086.eqiad.wmnet", "db1094.eqiad.wmnet", "db1079.eqiad.wmnet", "db1090.eqiad.wmnet", "db1136.eqiad.wmnet", "db1127.eqiad.wmnet", "db1101.eqiad.wmnet", "db1098.eqiad.wmnet" ] }, "page_restrictions pr_pagetype index-mismatch-code-extra": { "s1": [ "db1083.eqiad.wmnet", "db1106.eqiad.wmnet", "db1105.eqiad.wmnet", "db1119.eqiad.wmnet", "db1089.eqiad.wmnet", "db1107.eqiad.wmnet", "db1099.eqiad.wmnet", "db1118.eqiad.wmnet", "db1134.eqiad.wmnet", "db1091.eqiad.wmnet" ], "s2": [ "db1122.eqiad.wmnet", "db1129.eqiad.wmnet", "db1090.eqiad.wmnet", "db1074.eqiad.wmnet", "db1146.eqiad.wmnet", "db1076.eqiad.wmnet", "db1105.eqiad.wmnet" ], "s3": [ "db1123.eqiad.wmnet", "db1078.eqiad.wmnet", "db1112.eqiad.wmnet", "db1075.eqiad.wmnet" ], "s4": [ "db1081.eqiad.wmnet", "db1084.eqiad.wmnet", "db1141.eqiad.wmnet", "db1146.eqiad.wmnet", "db1121.eqiad.wmnet", "db1138.eqiad.wmnet", "db1143.eqiad.wmnet", "db1142.eqiad.wmnet", "db1144.eqiad.wmnet", "db1147.eqiad.wmnet", "db1148.eqiad.wmnet", "db1149.eqiad.wmnet" ], "s5": [ "db1100.eqiad.wmnet", "db1144.eqiad.wmnet", "db1113.eqiad.wmnet", "db1096.eqiad.wmnet", "db1130.eqiad.wmnet", "db1082.eqiad.wmnet", "db1110.eqiad.wmnet" ], "s6": [ "db1131.eqiad.wmnet", "db1088.eqiad.wmnet", "db1098.eqiad.wmnet", "db1096.eqiad.wmnet", "db1113.eqiad.wmnet", "db1093.eqiad.wmnet" ], "s7": [ "db1086.eqiad.wmnet", "db1094.eqiad.wmnet", "db1079.eqiad.wmnet", "db1090.eqiad.wmnet", "db1136.eqiad.wmnet", "db1127.eqiad.wmnet", "db1101.eqiad.wmnet", "db1098.eqiad.wmnet" ] },
ALTER TABLE:
alter table page_restrictions drop primary key, add primary key (pr_id), drop key pr_id, add UNIQUE KEY pr_pagetype (pr_page,pr_type), drop key pr_page;
Schema change progress:
- s1
- eqiad T256682#6339900
- codfw
- s2
- eqiad T256682#6336699
- codfw
- s3
- eqiad
- codfw
- s4
- eqiad T256682#6336750
- codfw
- s5
- eqiad T256682#6336504
- codfw
- s6
- eqiad T256682#6336359
- codfw
- s7
- eqiad T256682#6337351
- codfw
- s8 (not needed, schema was correct)
- labswiki (not needed, schema was correct)
- labtestwiki (not needed, schema was correct)