Page MenuHomePhabricator
Paste P16400

(An Untitled Masterwork)
ActivePublic

Authored by Marostegui on Jun 10 2021, 9:22 AM.
Tags
None
Referenced Files
F34489248: raw-paste-data.txt
Jun 10 2021, 9:22 AM
Subscribers
None
db1098:3316:
root@db1098.eqiad.wmnet[frwiki]> show create table change_tag\G
*************************** 1. row ***************************
Table: change_tag
Create Table: CREATE TABLE `change_tag` (
`ct_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ct_rc_id` int(10) unsigned DEFAULT NULL,
`ct_log_id` int(10) unsigned DEFAULT NULL,
`ct_rev_id` int(10) unsigned DEFAULT NULL,
`ct_params` blob DEFAULT NULL,
`ct_tag_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`ct_id`),
UNIQUE KEY `ct_rc_tag_id` (`ct_rc_id`,`ct_tag_id`),
UNIQUE KEY `ct_log_tag_id` (`ct_log_id`,`ct_tag_id`),
KEY `ct_tag_id_id` (`ct_tag_id`,`ct_rc_id`,`ct_rev_id`,`ct_log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=31843215 DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED
1 row in set (0.001 sec)
root@db1098.eqiad.wmnet[frwiki]> explain SELECT /* DifferenceEngine::loadRevisionData */ ct_tag_id AS `value` FROM `change_tag` WHERE ct_rev_id = 178004903 /* 53cc390a825e0a18df7723cd34285e2d db1098:3316 frwiki 2s */
-> ;
+------+-------------+------------+-------+---------------+--------------+---------+------+----------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+------------+-------+---------------+--------------+---------+------+----------+--------------------------+
| 1 | SIMPLE | change_tag | index | NULL | ct_tag_id_id | 19 | NULL | 25496139 | Using where; Using index |
+------+-------------+------------+-------+---------------+--------------+---------+------+----------+--------------------------+
1 row in set (0.000 sec)
db1096:3316
root@db1096.eqiad.wmnet[frwiki]> show create table change_tag\G
*************************** 1. row ***************************
Table: change_tag
Create Table: CREATE TABLE `change_tag` (
`ct_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ct_rc_id` int(10) unsigned DEFAULT NULL,
`ct_log_id` int(10) unsigned DEFAULT NULL,
`ct_rev_id` int(10) unsigned DEFAULT NULL,
`ct_params` blob DEFAULT NULL,
`ct_tag_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`ct_id`),
UNIQUE KEY `ct_rc_tag_id` (`ct_rc_id`,`ct_tag_id`),
UNIQUE KEY `ct_log_tag_id` (`ct_log_id`,`ct_tag_id`),
UNIQUE KEY `ct_rev_tag_id` (`ct_rev_id`,`ct_tag_id`),
KEY `ct_tag_id_id` (`ct_tag_id`,`ct_rc_id`,`ct_rev_id`,`ct_log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=31843234 DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED
1 row in set (0.001 sec)
root@db1096.eqiad.wmnet[frwiki]> explain SELECT /* DifferenceEngine::loadRevisionData */ ct_tag_id AS `value` FROM `change_tag` WHERE ct_rev_id = 178004903 /* 53cc390a825e0a18df7723cd34285e2d db1098:3316 frwiki 2s */;
+------+-------------+------------+------+---------------+---------------+---------+-------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+------------+------+---------------+---------------+---------+-------+------+-------------+
| 1 | SIMPLE | change_tag | ref | ct_rev_tag_id | ct_rev_tag_id | 5 | const | 2 | Using index |
+------+-------------+------------+------+---------------+---------------+---------+-------+------+-------------+
1 row in set (0.001 sec)

Event Timeline

root@db1098.eqiad.wmnet[frwiki]> CREATE UNIQUE INDEX ct_rev_tag_id ON  /*_*/change_tag (ct_rev_id, ct_tag_id);
ERROR 1062 (23000): Duplicate entry '183704908-185' for key 'ct_rev_tag_id'
root@db1113:~# mysql -S /run/mysqld/mysqld.s6.sock -e "show slave status\G"
*************************** 1. row ***************************
                Slave_IO_State:
                   Master_Host: db1173.eqiad.wmnet
                   Master_User: repl
                   Master_Port: 3306
                 Connect_Retry: 60
               Master_Log_File: db1173-bin.000313
           Read_Master_Log_Pos: 400654759
                Relay_Log_File: db1113-relay-bin.000025
                 Relay_Log_Pos: 400655059
         Relay_Master_Log_File: db1173-bin.000313
              Slave_IO_Running: No
             Slave_SQL_Running: No
               Replicate_Do_DB:
           Replicate_Ignore_DB:
            Replicate_Do_Table:
        Replicate_Ignore_Table:
       Replicate_Wild_Do_Table:
   Replicate_Wild_Ignore_Table:
                    Last_Errno: 0
                    Last_Error:
                  Skip_Counter: 0
           Exec_Master_Log_Pos: 400654759
               Relay_Log_Space: 400655417
               Until_Condition: None
                Until_Log_File:
                 Until_Log_Pos: 0
            Master_SSL_Allowed: Yes
            Master_SSL_CA_File:
            Master_SSL_CA_Path:
               Master_SSL_Cert:
             Master_SSL_Cipher:
                Master_SSL_Key:
         Seconds_Behind_Master: NULL
 Master_SSL_Verify_Server_Cert: No
                 Last_IO_Errno: 0
                 Last_IO_Error:
                Last_SQL_Errno: 0
                Last_SQL_Error:
   Replicate_Ignore_Server_Ids:
              Master_Server_Id: 171978805
                Master_SSL_Crl:
            Master_SSL_Crlpath:
                    Using_Gtid: Slave_Pos
                   Gtid_IO_Pos: 171974883-171974883-1921892293,0-180359184-3049354376,180367475-180367475-264159665,171970594-171970594-1063329989,171974662-171974662-836768948,171978904-171978904-200854125,171970705-171970705-239075862,171978766-171978766-1375989821,180359184-180359184-35598956,180367474-180367474-91976046,171978805-171978805-102808315
       Replicate_Do_Domain_Ids:
   Replicate_Ignore_Domain_Ids:
                 Parallel_Mode: conservative
                     SQL_Delay: 0
           SQL_Remaining_Delay: NULL
       Slave_SQL_Running_State:
              Slave_DDL_Groups: 0
Slave_Non_Transactional_Groups: 0
    Slave_Transactional_Groups: 12564988
root@db1098.eqiad.wmnet[frwiki]> explain SELECT /* DifferenceEngine::loadRevisionData */ ct_tag_id AS `value` FROM `change_tag` WHERE ct_rev_id = 178004903 /* 53cc390a825e0a18df7723cd34285e2d db1098:3316 frwiki 2s */;
+------+-------------+------------+------+---------------+---------------+---------+-------+------+-------------+
| id   | select_type | table      | type | possible_keys | key           | key_len | ref   | rows | Extra       |
+------+-------------+------------+------+---------------+---------------+---------+-------+------+-------------+
|    1 | SIMPLE      | change_tag | ref  | ct_rev_tag_id | ct_rev_tag_id | 5       | const | 2    | Using index |
+------+-------------+------------+------+---------------+---------------+---------+-------+------+-------------+
1 row in set (0.002 sec)