Page MenuHomePhabricator

Alter gbw_reason/gb_reason/gbw_by_text on WMF production
Closed, ResolvedPublic

Description

ALTER TABLE:

On centralauth run:

ALTER TABLE /*_*/globalblocks MODIFY gb_reason varbinary(767) NOT NULL;

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/GlobalBlocking/+/532265/6/localdb_patches/patch-globalblocks-reason-length.sql


On every other wiki where the global_block_whitelist table exists (should be every wiki database)

ALTER TABLE /*_*/global_block_whitelist MODIFY gbw_reason varbinary(767) NOT NULL;

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/GlobalBlocking/+/532265/6/localdb_patches/patch-global-block-whitelist-reason-length.sql

ALTER TABLE /*_*/global_block_whitelist MODIFY gbw_by_text varbinary(255) NOT NULL;

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/GlobalBlocking/+/532271/2/localdb_patches/patch-global_block_whitelist-use-varbinary.sql

Which becomes a combined SQL query of...

ALTER TABLE /*_*/global_block_whitelist
MODIFY gbw_reason varbinary(767) NOT NULL,
MODIFY gbw_by_text varbinary(255) NOT NULL;

WHEN? At DBAs leisure

Backwards Compatible? Yes

Progress:

  • labswiki
  • labtestwiki

Event Timeline

Reedy updated the task description. (Show Details)Aug 25 2019, 7:33 PM

Thanks for following up

Marostegui added a subscriber: Marostegui.

Can you also paste the Gerrit link to the alter table?
https://wikitech.wikimedia.org/wiki/Schema_changes#Workflow_of_a_schema_change

I'm going to remove the Blocked-on-schema-change tag, as the patch isn't merged yet.
Please add it back once this is ready to go as the template paste above shows.
Sorry to be so strict but we prefer to follow that template to avoid any potential mistakes when doing alters in production :-)

Can you also paste the Gerrit link to the alter table?
https://wikitech.wikimedia.org/wiki/Schema_changes#Workflow_of_a_schema_change
I'm going to remove the Blocked-on-schema-change tag, as the patch isn't merged yet.
Please add it back once this is ready to go as the template paste above shows.
Sorry to be so strict but we prefer to follow that template to avoid any potential mistakes when doing alters in production :-)

Sure, its currently the patches at https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/GlobalBlocking/+/532265/

Reedy renamed this task from Extend gbw_reason/gb_reason on WMF production to Alter gbw_reason/gb_reason on WMF production.Aug 25 2019, 8:11 PM
Reedy updated the task description. (Show Details)Aug 25 2019, 8:19 PM
DannyS712 renamed this task from Alter gbw_reason/gb_reason on WMF production to Alter gbw_reason/gb_reason/gbw_by_text on WMF production.Aug 25 2019, 8:33 PM
Reedy added a comment.Aug 25 2019, 9:29 PM

Altered centralauth.globalblocks on beta. beta-update-databases-eqiad has updated the tables on the various wikis

Marostegui updated the task description. (Show Details)Aug 26 2019, 5:57 AM
Marostegui updated the task description. (Show Details)
Marostegui triaged this task as Normal priority.
Marostegui updated the task description. (Show Details)
Marostegui updated the task description. (Show Details)Sep 18 2019, 9:01 AM
Marostegui updated the task description. (Show Details)Sep 18 2019, 12:23 PM

I will start with s6 which I will do on codfw master first, and then on each slave on eqiad.
The tables have only 4 rows. If everything goes fine, I will start deploying directly on eqiad masters for the rest of the shards that have empty tables.

Mentioned in SAL (#wikimedia-operations) [2019-09-18T12:40:17Z] <marostegui> Deploy schema change on s6 codfw master with replication T231172

Marostegui updated the task description. (Show Details)Sep 18 2019, 12:42 PM
Marostegui moved this task from Backlog to In progress on the Blocked-on-schema-change board.
Marostegui added a comment.EditedSep 18 2019, 12:47 PM

s6 eqiad progress

  • labsdb1012
  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1005
  • db1139
  • db1131
  • db1125
  • db1113
  • db1098
  • db1096
  • db1093
  • db1088
  • db1085
  • db1061

Mentioned in SAL (#wikimedia-operations) [2019-09-18T12:56:12Z] <marostegui> Deploy schema change on the following s6 hosts: db1088, db1093, db1096, db1098, db1139, dbstore1005 - T231172

Marostegui updated the task description. (Show Details)Sep 18 2019, 1:30 PM

Mentioned in SAL (#wikimedia-operations) [2019-09-24T08:18:24Z] <marostegui> Deploy schema change on s5 master with replication - T231172

Marostegui updated the task description. (Show Details)Sep 24 2019, 8:28 AM

Mentioned in SAL (#wikimedia-operations) [2019-09-24T08:30:15Z] <marostegui> Deploy schema change on s4 master with replication - T231172

Marostegui updated the task description. (Show Details)Sep 24 2019, 8:35 AM

Mentioned in SAL (#wikimedia-operations) [2019-09-24T08:43:44Z] <marostegui> Deploy schema change on s8 master with replication - T231172

Marostegui updated the task description. (Show Details)Sep 24 2019, 8:44 AM

Mentioned in SAL (#wikimedia-operations) [2019-09-24T09:30:16Z] <marostegui> Deploy schema change on s2 master with replication - T231172

Marostegui updated the task description. (Show Details)Sep 24 2019, 9:55 AM

Mentioned in SAL (#wikimedia-operations) [2019-09-24T09:58:25Z] <marostegui> Deploy schema change on labswiki (wikitech) and labtestwiki T231172

Marostegui updated the task description. (Show Details)Sep 24 2019, 9:58 AM

Mentioned in SAL (#wikimedia-operations) [2019-09-24T10:03:31Z] <marostegui> Deploy schema change on s1 master with replication - T231172

Marostegui updated the task description. (Show Details)Sep 24 2019, 10:05 AM

Mentioned in SAL (#wikimedia-operations) [2019-09-24T10:12:31Z] <marostegui> Deploy schema change on s7 (centralauth and wikis) master with replication - T231172

Marostegui updated the task description. (Show Details)Sep 24 2019, 10:24 AM

Mentioned in SAL (#wikimedia-operations) [2019-09-25T04:43:44Z] <marostegui> Deploy schema change on s3 with replication - T231172

Marostegui closed this task as Resolved.Sep 26 2019, 6:15 AM
Marostegui updated the task description. (Show Details)

s3 finished, so all done