Page MenuHomePhabricator

Adjust the field type of flow_revision.rev_mod_timestamp to fixed binary on wmf wikis
Closed, ResolvedPublic


Apply T310420 to wmf wikis

  1. ALTERs to run:
  2. Where to run those changes: See flow dblist -
  3. When to run those changes: any time
  4. If the schema change is backwards compatible: Yes
  5. If the schema change has been tested already on some of the test/beta wikis: beta cluster is running with the new schema
  6. if the data should be made available on the labs replicas and/or dumps: no change of the existing rules


  • s3
  • x1 (requires switching to SBR)

Event Timeline

I assume the flowdb database in x1 also needs this:

root@db1137:/srv# mysql flowdb -e "show create table flow_revision\G"
*************************** 1. row ***************************
       Table: flow_revision
Create Table: CREATE TABLE `flow_revision` (
  `rev_id` binary(11) NOT NULL,
  `rev_type` varbinary(16) NOT NULL,
  `rev_user_id` bigint(20) unsigned NOT NULL,
  `rev_parent_id` binary(11) DEFAULT NULL,
  `rev_flags` tinyblob NOT NULL,
  `rev_content` mediumblob NOT NULL,
  `rev_change_type` varbinary(255) DEFAULT NULL,
  `rev_mod_state` varbinary(32) NOT NULL,
  `rev_mod_user_id` bigint(20) unsigned DEFAULT NULL,
  `rev_mod_timestamp` varbinary(14) DEFAULT NULL,
  `rev_mod_reason` varbinary(255) DEFAULT NULL,
  `rev_last_edit_id` binary(11) DEFAULT NULL,
  `rev_edit_user_id` bigint(20) unsigned DEFAULT NULL,
  `rev_user_ip` varbinary(39) DEFAULT NULL,
  `rev_mod_user_ip` varbinary(39) DEFAULT NULL,
  `rev_edit_user_ip` varbinary(39) DEFAULT NULL,
  `rev_user_wiki` varbinary(64) NOT NULL,
  `rev_mod_user_wiki` varbinary(64) DEFAULT NULL,
  `rev_edit_user_wiki` varbinary(64) DEFAULT NULL,
  `rev_type_id` binary(11) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0',
  `rev_content_length` int(11) NOT NULL DEFAULT 0,
  `rev_previous_content_length` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`rev_id`),
  UNIQUE KEY `flow_revision_unique_parent` (`rev_parent_id`),
  KEY `flow_revision_user` (`rev_user_id`,`rev_user_ip`,`rev_user_wiki`),
  KEY `flow_revision_type_id` (`rev_type`,`rev_type_id`)
Marostegui moved this task from Triage to Ready on the DBA board.

So the databases that have the table _outside_ of x1 are officewiki and techconductwiki, which are on s3.

I have done s3 wikis, but for x1 we need to switch to SBR temporarily to be able to apply the changes and then do a master switchover.
We should do that along with T312160

Marostegui updated the task description. (Show Details)
Marostegui moved this task from Ready to In progress on the DBA board.

There is no milestone this must be done as the production site would run with both schemas.

It is just to avoid the schema drift between code and production. There is also T255174 which seems to need something similiar. It is possible that some more tasks like this are coming in the future.

x1 done after switching it to SBR