Page MenuHomePhabricator

Remove partitions from metawiki.pagelinks
Closed, ResolvedPublic

Description

The table pagelinks in the metawiki database has partitioning.
At this point MariaDB doesn't support moving partitions (https://jira.mariadb.org/browse/MDEV-11351) there is a non official procedure which might be to risky.
So for now

  • Remove partitioning

alter table pagelinks remove partitioning

  • Do the transfer to dbstore2001
  • Add partitioning back to db2068.? (Probably not needed as the new hosts in eqiad do not have them: T151552#2872382
alter table pagelinks
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);

Event Timeline

Mentioned in SAL (#wikimedia-operations) [2016-12-14T13:25:01Z] <marostegui> Deploy alter table to remove partitions on metawiki.pagelinks - db2068 - T153194

This is now running on db2068:

./software/dbtools/osc_host.sh --host=db2068.codfw.wmnet --port=3306 --db=metawiki --table=pagelinks --method=ddl --no-replicate "remove partitioning"

The partitions are now removed

root@neodymium:/home/marostegui/git/software/dbtools# mysql -hdb2068.codfw.wmnet -A metawiki -e "show create table pagelinks\G"
*************************** 1. row ***************************
       Table: pagelinks
Create Table: 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',
  UNIQUE KEY `pl_from` (`pl_from`,`pl_namespace`,`pl_title`) KEY_BLOCK_SIZE=4,
  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

Given that the new hosts in eqiad do not have partitions, I will not add them back to this host.