Page MenuHomePhabricator

Remove partitions from s7 masters (db1062 and db2040) for metawiki.pagelinks
Closed, ResolvedPublic

Description

I just noticed that db1062 and db2040 (s7 master) have their table metawiki.pagelinks partitioned:

CREATE TABLE `pagelinks` (
  `pl_from` int(8) unsigned NOT NULL DEFAULT '0',
  `pl_namespace` int(11) NOT NULL DEFAULT '0',
  `pl_title` varbinary(255) NOT NULL DEFAULT '',
  `pl_from_namespace` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pl_from`,`pl_namespace`,`pl_title`),
  KEY `pl_namespace` (`pl_namespace`,`pl_title`,`pl_from`),
  KEY `pl_backlinks_namespace` (`pl_from_namespace`,`pl_namespace`,`pl_title`,`pl_from`)
) ENGINE=InnoDB DEFAULT CHARSET=binary
/*!50100 PARTITION BY RANGE (pl_namespace)
(PARTITION p_2 VALUES LESS THAN (3) ENGINE = InnoDB,
 PARTITION p_9 VALUES LESS THAN (10) ENGINE = InnoDB,
 PARTITION p_10 VALUES LESS THAN (11) ENGINE = InnoDB,
 PARTITION p_max VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */

This is probably a leftover from when these hosts were cloned or something as the other slaves don't have it (apart from recentchanges ones).

ALTER table to run: set session sql_log_bin=0; alter table pagelinks remove partitioning;

Progress:

  • db1062
  • db2040

Event Timeline

Marostegui created this task.

Mentioned in SAL (#wikimedia-operations) [2018-09-05T08:37:51Z] <marostegui> Drop partitions from db2040 (s7 master) for metawiki.pagelinks - T203548

db2040 finished:

root@db2040.codfw.wmnet[metawiki]> alter table pagelinks remove partitioning;

Query OK, 968681449 rows affected (8 hours 33 min 57.15 sec)
Records: 968681449  Duplicates: 0  Warnings: 0

root@db2040.codfw.wmnet[metawiki]> show create table pagelinks;
+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Table     | Create Table
+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| pagelinks | CREATE TABLE `pagelinks` (
  `pl_from` int(8) unsigned NOT NULL DEFAULT '0',
  `pl_namespace` int(11) NOT NULL DEFAULT '0',
  `pl_title` varbinary(255) NOT NULL DEFAULT '',
  `pl_from_namespace` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pl_from`,`pl_namespace`,`pl_title`),
  KEY `pl_namespace` (`pl_namespace`,`pl_title`,`pl_from`) KEY_BLOCK_SIZE=4,
  KEY `pl_backlinks_namespace` (`pl_from_namespace`,`pl_namespace`,`pl_title`,`pl_from`)
) ENGINE=InnoDB DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8

db1062 will need to be done once eqiad is passive.

Mentioned in SAL (#wikimedia-operations) [2018-09-17T09:50:25Z] <marostegui> Deploy schema change on db1062 - T203548

db1062 is now done:

root@db1062.eqiad.wmnet[metawiki]> set session sql_log_bin=0; alter table pagelinks remove partitioning;
Query OK, 0 rows affected (0.00 sec)

Query OK, 968771427 rows affected (3 hours 15 min 3.48 sec)
Records: 968771427  Duplicates: 0  Warnings: 0

root@db1062.eqiad.wmnet[metawiki]> show create table pagelinks;
+-----------+--------------------------------------------------------------------------------------------------------------------------
| Table     | Create Table
+-----------+--------------------------------------------------------------------------------------------------------------------------
| pagelinks | CREATE TABLE `pagelinks` (
  `pl_from` int(8) unsigned NOT NULL DEFAULT '0',
  `pl_namespace` int(11) NOT NULL DEFAULT '0',
  `pl_title` varbinary(255) NOT NULL DEFAULT '',
  `pl_from_namespace` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pl_from`,`pl_namespace`,`pl_title`),
  KEY `pl_namespace` (`pl_namespace`,`pl_title`,`pl_from`),
  KEY `pl_backlinks_namespace` (`pl_from_namespace`,`pl_namespace`,`pl_title`,`pl_from`)
) ENGINE=InnoDB DEFAULT CHARSET=binary |
+-----------+--------------------------------------------------------------------------------------------------------------------------
1 row in set (0.00 sec)