Page MenuHomePhabricator

Change job table to use mediumblob for job_params field
Closed, ResolvedPublic

Description

alter table: https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/500481/1/maintenance/archives/patch-job-params-mediumblob.sql

This change should only effect labswiki and labtestwiki. The SQL based job queue is not used outside of these two wikis.

Where: all wikis (table should be empty everywhere except labswiki and labtestwiki)
When: Any time, no application changes are necessary to support this change
Backwards Compatible: Yes
Tested Already: Tested on vagrant, change can be first applied to labtestwiki

Schema change progress:

  • s1
  • s2
  • s3
  • s4
  • s5
  • s6
  • s7
  • s8
  • labswiki
  • labtestwiki

Event Timeline

Marostegui moved this task from Triage to Pending comment on the DBA board.
Marostegui added a subscriber: Marostegui.

Confirmed the table is empty in core. So the schema change should be able to be done fast there (directly on the master)

Mentioned in SAL (#wikimedia-operations) [2019-04-03T07:25:47Z] <marostegui> Deploy schema change on db1073, labtestwiki - T219887

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

Change applied first to labtestwiki as requested :-)

root@db1073.eqiad.wmnet[labtestwiki]> show create table job\G
*************************** 1. row ***************************
       Table: job
Create Table: CREATE TABLE `job` (
  `job_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `job_cmd` varbinary(60) NOT NULL DEFAULT '',
  `job_namespace` int(11) NOT NULL,
  `job_title` varbinary(255) NOT NULL,
  `job_timestamp` varbinary(14) DEFAULT NULL,
  `job_params` mediumblob NOT NULL,
  `job_random` int(10) unsigned NOT NULL DEFAULT '0',
  `job_attempts` int(10) unsigned NOT NULL DEFAULT '0',
  `job_token` varbinary(32) NOT NULL DEFAULT '',
  `job_token_timestamp` varbinary(14) DEFAULT NULL,
  `job_sha1` varbinary(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`job_id`),
  KEY `job_sha1` (`job_sha1`),
  KEY `job_cmd_token` (`job_cmd`,`job_token`,`job_random`),
  KEY `job_cmd_token_id` (`job_cmd`,`job_token`,`job_id`),
  KEY `job_cmd` (`job_cmd`,`job_namespace`,`job_title`,`job_params`(128)),
  KEY `job_timestamp` (`job_timestamp`)
) ENGINE=InnoDB AUTO_INCREMENT=3508 DEFAULT CHARSET=binary
1 row in set (0.00 sec)

Mentioned in SAL (#wikimedia-operations) [2019-04-03T09:56:30Z] <marostegui> Alter empty job table on s6 primary master - T219887

Mentioned in SAL (#wikimedia-operations) [2019-04-04T04:58:49Z] <marostegui> Deploy schema change on labswiki for the job table - T219887

s3 hosts:

  • labsdb1012
  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1004
  • db1124
  • db1123
  • db1095
  • db1075
  • db1077
  • db1078
Marostegui updated the task description. (Show Details)

This is all done