Page MenuHomePhabricator

Remove partitioning from db2019 (codfw master) commonswiki.templatelinks
Closed, ResolvedPublic

Description

Probably db2019 (codfw s4 master) was recloned from an special slave and has templatelinks table partitioned.

db2019.codfw.wmnet
*************************** 1. row ***************************
       Table: templatelinks
Create Table: CREATE TABLE `templatelinks` (
  `tl_from` int(8) unsigned NOT NULL DEFAULT '0',
  `tl_namespace` int(11) NOT NULL DEFAULT '0',
  `tl_title` varbinary(255) NOT NULL DEFAULT '',
  `tl_from_namespace` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `tl_from` (`tl_from`,`tl_namespace`,`tl_title`),
  KEY `tl_namespace` (`tl_namespace`,`tl_title`,`tl_from`),
  KEY `tl_backlinks_namespace` (`tl_from_namespace`,`tl_namespace`,`tl_title`,`tl_from`)
) ENGINE=InnoDB DEFAULT CHARSET=binary
/*!50100 PARTITION BY RANGE (tl_namespace)
(PARTITION p_9 VALUES LESS THAN (10) ENGINE = InnoDB,
 PARTITION p_10 VALUES LESS THAN (11) ENGINE = InnoDB,
 PARTITION p_827 VALUES LESS THAN (828) ENGINE = InnoDB,
 PARTITION p_828 VALUES LESS THAN (829) ENGINE = InnoDB,
 PARTITION p_max VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */

They should be removed.
This is a non online operation so lag will be generated in the whole DC while the remove takes place:

./osc_host.sh --host=db2019.codfw.wmnet --port=3306 --db=commonswiki --table=templatelinks --method=ddl --no-replicate "remove partitioning"

Event Timeline

Marostegui triaged this task as Medium priority.Mar 29 2017, 8:05 AM
Marostegui moved this task from Triage to Backlog on the DBA board.

Mentioned in SAL (#wikimedia-operations) [2017-04-04T06:43:54Z] <marostegui> Deploy alter table on db2019 (codfw s4 master) - this will generate lag on codfw for s4 - T161683

Marostegui moved this task from Backlog to In progress on the DBA board.

This alter table is now running

Self reminder to increase the downtime if tomorrow is has not yet finished/caught up.

This finished and all the slaves caught up around 5:30AM

root@neodymium:/home/marostegui# mysql --skip-ssl -hdb2019.codfw.wmnet -e "show create table commonswiki.templatelinks\G"
*************************** 1. row ***************************
       Table: templatelinks
Create Table: CREATE TABLE `templatelinks` (
  `tl_from` int(8) unsigned NOT NULL DEFAULT '0',
  `tl_namespace` int(11) NOT NULL DEFAULT '0',
  `tl_title` varbinary(255) NOT NULL DEFAULT '',
  `tl_from_namespace` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `tl_from` (`tl_from`,`tl_namespace`,`tl_title`),
  KEY `tl_namespace` (`tl_namespace`,`tl_title`,`tl_from`),
  KEY `tl_backlinks_namespace` (`tl_from_namespace`,`tl_namespace`,`tl_title`,`tl_from`)
) ENGINE=InnoDB DEFAULT CHARSET=binary