Page MenuHomePhabricator

Drop default value from cul_actor on wmf wikis
Closed, ResolvedPublic

Description

  1. ALTERs to run: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/884824/3/schema/mysql/patch-cu_log-drop-actor_default.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
  • labtestwiki

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
ResolvedZabe
ResolvedMarostegui

Event Timeline

Tested (and DB change is active on) on https://checkuser-beta-wiki.wmcloud.org. Followed the steps:

  1. Ran describe cu_log on the DB (paste 1)
  2. Pulled latest commits from main branch (origin/master) and ran vagrant git-update
  3. Ran describe cu_log on the DB (paste 2)
  4. Ran a test check using all ways I could trigger the code that inserts to cu_log (Special:CheckUser, Special:Investigate and CheckUser API)
  5. Opened Special:CheckUserLog, which was as expected
  6. Checked logs for errors (there were none)

Before (paste 1)

(22:11) vagrant@localhost:[wiki]> describe cu_log;
+-------------------------+---------------------+------+-----+---------+----------------+
| Field                   | Type                | Null | Key | Default | Extra          |
+-------------------------+---------------------+------+-----+---------+----------------+
| cul_id                  | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| cul_timestamp           | binary(14)          | NO   | MUL | NULL    |                |
| cul_actor               | bigint(20) unsigned | NO   | MUL | 0       |                |
| cul_reason              | varbinary(255)      | NO   |     |         |                |
| cul_reason_id           | bigint(20) unsigned | NO   |     | 0       |                |
| cul_reason_plaintext_id | bigint(20) unsigned | NO   |     | 0       |                |
| cul_type                | varbinary(30)       | NO   | MUL | NULL    |                |
| cul_target_id           | int(10) unsigned    | NO   |     | 0       |                |
| cul_target_text         | blob                | NO   |     | NULL    |                |
| cul_target_hex          | varbinary(255)      | NO   | MUL |         |                |
| cul_range_start         | varbinary(255)      | NO   | MUL |         |                |
| cul_range_end           | varbinary(255)      | NO   |     |         |                |
+-------------------------+---------------------+------+-----+---------+----------------+
12 rows in set (0.002 sec)

After (paste 2)

(22:15) vagrant@localhost:[wiki]> describe cu_log;
+-------------------------+---------------------+------+-----+---------+----------------+
| Field                   | Type                | Null | Key | Default | Extra          |
+-------------------------+---------------------+------+-----+---------+----------------+
| cul_id                  | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| cul_timestamp           | binary(14)          | NO   | MUL | NULL    |                |
| cul_actor               | bigint(20) unsigned | NO   | MUL | NULL    |                |
| cul_reason              | varbinary(255)      | NO   |     |         |                |
| cul_reason_id           | bigint(20) unsigned | NO   |     | 0       |                |
| cul_reason_plaintext_id | bigint(20) unsigned | NO   |     | 0       |                |
| cul_type                | varbinary(30)       | NO   | MUL | NULL    |                |
| cul_target_id           | int(10) unsigned    | NO   |     | 0       |                |
| cul_target_text         | blob                | NO   |     | NULL    |                |
| cul_target_hex          | varbinary(255)      | NO   | MUL |         |                |
| cul_range_start         | varbinary(255)      | NO   | MUL |         |                |
| cul_range_end           | varbinary(255)      | NO   |     |         |                |
+-------------------------+---------------------+------+-----+---------+----------------+
12 rows in set (0.002 sec)

Again this can be run with replication in every wiki (and possibly enwiki)

Marostegui triaged this task as Medium priority.Jan 31 2023, 6:51 AM
Marostegui moved this task from Triage to In progress on the DBA board.

Mentioned in SAL (#wikimedia-operations) [2023-01-31T06:52:47Z] <marostegui> dbmaint Schema change on s8 eqiad T328373

Mentioned in SAL (#wikimedia-operations) [2023-01-31T06:57:52Z] <marostegui> dbmaint Schema change on s4 eqiad T328373

Mentioned in SAL (#wikimedia-operations) [2023-01-31T06:59:25Z] <marostegui> dbmaint Schema change on s7 eqiad T328373

Mentioned in SAL (#wikimedia-operations) [2023-01-31T07:03:05Z] <marostegui> dbmaint Schema change on s5 eqiad T328373

Mentioned in SAL (#wikimedia-operations) [2023-01-31T07:22:42Z] <marostegui> dbmaint Schema change on s1 eqiad T328373

Mentioned in SAL (#wikimedia-operations) [2023-01-31T07:22:49Z] <marostegui> dbmaint Schema change on s3 eqiad T328373

Started it on s3, it will take around 5h