Page MenuHomePhabricator

Drop default value from cuc_actor and cuc_comment_id on wmf wikis
Closed, ResolvedPublic

Description

  1. ALTERs to run: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/889168/2/schema/mysql/patch-cu_changes-drop-defaults.sql
  2. Where to run those changes: all.dblist
  3. When to run those changes: When DBA has 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 doesn't have checkuser
  6. if the data should be made available on the labs replicas and/or dumps: No, data is private.

Progress

  • s1
  • s2
  • s3
  • s4
  • s5
  • s6
  • s7
  • s8 (eqiad is done)
  • labtestwiki

Event Timeline

Ladsgroup triaged this task as Medium priority.Feb 14 2023, 10:27 PM
Ladsgroup moved this task from Triage to Blocked on the DBA board.
Ladsgroup added a subscriber: Ladsgroup.

Let's wait for T329260 and T328817 to be done first

Zabe renamed this task from Drop default value from cuc_actor and cuc_comment on wmf wikis to Drop default value from cuc_actor and cuc_comment_id on wmf wikis.Feb 14 2023, 11:30 PM

Deployed and tested on https://checkuser-beta-wiki.wmcloud.org:

  • Ran describe cu_changes
  • Pulled latest origin and ran vagrant git-update
  • Ran describe cu_changes
  • Made a test edit to trigger an insertion into cu_changes - this diff
  • Ran a check using Special:CheckUser
  • Inspected the debug log (no problems seen)

Describe before SQL alter

(09:57) vagrant@localhost:[wiki]> describe cu_changes;
+-----------------------+---------------------+------+-----+---------+----------------+
| Field                 | Type                | Null | Key | Default | Extra          |
+-----------------------+---------------------+------+-----+---------+----------------+
| cuc_id                | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| cuc_namespace         | int(11)             | NO   |     | 0       |                |
| cuc_title             | varbinary(255)      | NO   |     |         |                |
| cuc_actor             | bigint(20) unsigned | NO   | MUL | 0       |                |
| cuc_actiontext        | varbinary(255)      | NO   |     |         |                |
| cuc_comment_id        | bigint(20) unsigned | NO   |     | 0       |                |
| cuc_minor             | tinyint(1)          | NO   |     | 0       |                |
| cuc_page_id           | int(10) unsigned    | NO   |     | 0       |                |
| cuc_this_oldid        | int(10) unsigned    | NO   |     | 0       |                |
| cuc_last_oldid        | int(10) unsigned    | NO   |     | 0       |                |
| cuc_type              | tinyint(3) unsigned | NO   |     | 0       |                |
| cuc_timestamp         | binary(14)          | NO   | MUL | NULL    |                |
| cuc_ip                | varbinary(255)      | YES  |     |         |                |
| cuc_ip_hex            | varbinary(255)      | YES  | MUL | NULL    |                |
| cuc_xff               | varbinary(255)      | YES  |     |         |                |
| cuc_xff_hex           | varbinary(255)      | YES  | MUL | NULL    |                |
| cuc_agent             | varbinary(255)      | YES  |     | NULL    |                |
| cuc_private           | mediumblob          | YES  |     | NULL    |                |
| cuc_only_for_read_old | tinyint(1)          | NO   |     | 0       |                |
+-----------------------+---------------------+------+-----+---------+----------------+
19 rows in set (0.007 sec)

Describe after SQL alter

(10:02) vagrant@localhost:[wiki]> describe cu_changes;
+-----------------------+---------------------+------+-----+---------+----------------+
| Field                 | Type                | Null | Key | Default | Extra          |
+-----------------------+---------------------+------+-----+---------+----------------+
| cuc_id                | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| cuc_namespace         | int(11)             | NO   |     | 0       |                |
| cuc_title             | varbinary(255)      | NO   |     |         |                |
| cuc_actor             | bigint(20) unsigned | NO   | MUL | NULL    |                |
| cuc_actiontext        | varbinary(255)      | NO   |     |         |                |
| cuc_comment_id        | bigint(20) unsigned | NO   |     | NULL    |                |
| cuc_minor             | tinyint(1)          | NO   |     | 0       |                |
| cuc_page_id           | int(10) unsigned    | NO   |     | 0       |                |
| cuc_this_oldid        | int(10) unsigned    | NO   |     | 0       |                |
| cuc_last_oldid        | int(10) unsigned    | NO   |     | 0       |                |
| cuc_type              | tinyint(3) unsigned | NO   |     | 0       |                |
| cuc_timestamp         | binary(14)          | NO   | MUL | NULL    |                |
| cuc_ip                | varbinary(255)      | YES  |     |         |                |
| cuc_ip_hex            | varbinary(255)      | YES  | MUL | NULL    |                |
| cuc_xff               | varbinary(255)      | YES  |     |         |                |
| cuc_xff_hex           | varbinary(255)      | YES  | MUL | NULL    |                |
| cuc_agent             | varbinary(255)      | YES  |     | NULL    |                |
| cuc_private           | mediumblob          | YES  |     | NULL    |                |
| cuc_only_for_read_old | tinyint(1)          | NO   |     | 0       |                |
+-----------------------+---------------------+------+-----+---------+----------------+
19 rows in set (0.002 sec)
Marostegui added a subscriber: Marostegui.

I will take care of this once I am done with T329260 and T328817

Marostegui updated the task description. (Show Details)

Mentioned in SAL (#wikimedia-operations) [2023-03-09T06:40:34Z] <marostegui> Deploy schema change on s6 eqiad dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T06:42:37Z] <marostegui> Deploy schema change on s5 eqiad dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T06:43:20Z] <marostegui> Deploy schema change on s2 eqiad dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T06:48:01Z] <marostegui> Deploy schema change on s4 eqiad dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T06:48:11Z] <marostegui> Deploy schema change on s1 eqiad dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T07:02:24Z] <marostegui@cumin1001> dbctl commit (dc=all): 'Depooling db1113:3316 (T329684)', diff saved to https://phabricator.wikimedia.org/P45616 and previous config saved to /var/cache/conftool/dbconfig/20230309-070223-marostegui.json

Mentioned in SAL (#wikimedia-operations) [2023-03-09T07:03:30Z] <marostegui@cumin1001> dbctl commit (dc=all): 'Depooling db2117 (T329684)', diff saved to https://phabricator.wikimedia.org/P45617 and previous config saved to /var/cache/conftool/dbconfig/20230309-070327-marostegui.json

Mentioned in SAL (#wikimedia-operations) [2023-03-09T07:06:58Z] <marostegui@cumin1001> dbctl commit (dc=all): 'Depooling db1113:3316 (T329684)', diff saved to https://phabricator.wikimedia.org/P45618 and previous config saved to /var/cache/conftool/dbconfig/20230309-070658-marostegui.json

Mentioned in SAL (#wikimedia-operations) [2023-03-09T07:08:05Z] <marostegui@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1113:3316 (T329684)', diff saved to https://phabricator.wikimedia.org/P45620 and previous config saved to /var/cache/conftool/dbconfig/20230309-070805-marostegui.json

Change 895906 had a related patch set uploaded (by Marostegui; author: Marostegui):

[operations/software/schema-changes@master] change_cuc_actor_T329684.py: New schema change

https://gerrit.wikimedia.org/r/895906

Mentioned in SAL (#wikimedia-operations) [2023-03-09T07:13:13Z] <marostegui> Deploy schema change on s8 eqiad dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T07:13:56Z] <marostegui> Deploy schema change on s7 eqiad dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T07:15:13Z] <marostegui> Deploy schema change on s3 eqiad dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T07:18:54Z] <marostegui@cumin1001> dbctl commit (dc=all): 'Depooling db2104 (T329684)', diff saved to https://phabricator.wikimedia.org/P45623 and previous config saved to /var/cache/conftool/dbconfig/20230309-071853-marostegui.json

Mentioned in SAL (#wikimedia-operations) [2023-03-09T08:44:00Z] <marostegui@cumin1001> dbctl commit (dc=all): 'Depooling db2180 (T329684)', diff saved to https://phabricator.wikimedia.org/P45648 and previous config saved to /var/cache/conftool/dbconfig/20230309-084359-marostegui.json

Mentioned in SAL (#wikimedia-operations) [2023-03-09T08:54:17Z] <marostegui> Deploy schema change on s6 codfw dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T08:54:24Z] <marostegui> Deploy schema change on s5 codfw dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T08:54:30Z] <marostegui> Deploy schema change on s2 codfw dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T09:19:44Z] <marostegui> Deploy schema change on s7 codfw dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T09:53:07Z] <marostegui> Deploy schema change on s8 codfw dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-09T09:55:38Z] <marostegui> Deploy schema change on s4 codfw dbmaint T329684

Change 895906 merged by jenkins-bot:

[operations/software/schema-changes@master] change_cuc_actor_T329684.py: New schema change

https://gerrit.wikimedia.org/r/895906

Mentioned in SAL (#wikimedia-operations) [2023-03-09T11:43:38Z] <marostegui@cumin1001> dbctl commit (dc=all): 'Depooling db2180 (T329684)', diff saved to https://phabricator.wikimedia.org/P45679 and previous config saved to /var/cache/conftool/dbconfig/20230309-114338-marostegui.json

Mentioned in SAL (#wikimedia-operations) [2023-03-09T11:47:43Z] <marostegui> Deploy schema change on s1 codfw dbmaint T329684

Mentioned in SAL (#wikimedia-operations) [2023-03-13T06:16:27Z] <marostegui_> Deploy schema change on s3 codfw dbmaint T329684

Starting this on s3 with replication - it will take around 6h

Marostegui updated the task description. (Show Details)

This is all done