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

Restricted Application edited projects, added Discovery-Search; removed Discovery-Search (Current work). · View Herald TranscriptApr 2 2019, 3:44 PM
EBernhardson removed EBernhardson as the assignee of this task.Apr 2 2019, 3:45 PM
EBernhardson moved this task from in progress to Waiting on the Discovery-Search (Current work) board.
Marostegui triaged this task as Normal priority.Apr 2 2019, 3:56 PM
Marostegui moved this task from Triage to Next 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)

Marostegui updated the task description. (Show Details)Apr 3 2019, 5:44 AM

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

Marostegui moved this task from Next 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)
Marostegui updated the task description. (Show Details)Apr 3 2019, 7:27 AM

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

Marostegui updated the task description. (Show Details)Apr 3 2019, 9:56 AM
Marostegui updated the task description. (Show Details)Apr 3 2019, 10:02 AM
GTirloni removed a subscriber: GTirloni.Apr 3 2019, 10:14 AM
Marostegui updated the task description. (Show Details)Apr 3 2019, 10:38 AM
Marostegui updated the task description. (Show Details)Apr 3 2019, 10:42 AM
Marostegui updated the task description. (Show Details)Apr 3 2019, 10:52 AM
Marostegui updated the task description. (Show Details)Apr 3 2019, 1:16 PM
Marostegui updated the task description. (Show Details)Apr 3 2019, 3:11 PM

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

Marostegui updated the task description. (Show Details)Apr 4 2019, 4:59 AM
Marostegui updated the task description. (Show Details)Apr 4 2019, 5:08 AM
Marostegui added a comment.EditedApr 4 2019, 5:26 AM

s3 hosts:

  • labsdb1012
  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1004
  • db1124
  • db1123
  • db1095
  • db1075
  • db1077
  • db1078
Marostegui closed this task as Resolved.Apr 4 2019, 5:34 AM
Marostegui updated the task description. (Show Details)

This is all done