Page MenuHomePhabricator

Remove etp_user from echo_target_page in production
Closed, ResolvedPublic

Description

Was removed in software in T143959: Remove etp_user from echo_target_page, but never removed in production

SQL: https://github.com/wikimedia/mediawiki-extensions-Echo/blob/master/db_patches/patch-drop-echo_target_page-etp_user.sql
Where: on x1, for all databases that have an echo_target_page table (this should be the same set of databases as echo.dblist)
Backwards compatible: yes, all software references to the table were removed in 2016

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

If this schema change is ready to go, it would be great if we could get the task following the template described at https://wikitech.wikimedia.org/wiki/Schema_changes#Workflow_of_a_schema_change
It is easier for us to follow it, as all the information is clear and would prevent any possible mistakes when executing it.

Thanks!

Updated the task description to match the template. Sorry for forgetting, and thanks for the reminder, it's been a few years since I've requested a schema change :)

Marostegui triaged this task as Medium priority.Mar 5 2019, 6:10 AM
Marostegui moved this task from Blocked external/Not db team to Backlog on the DBA board.

This required some testing as x1 runs ROW based replication, so we need to be careful as dropping a column might break replication if not executed directly on the master (as we have seen in the past)

Another possibility is to run it directly on the master and let the master serve READs while the slaves replicate all the drops.

We can do the second at a period of low traffic, although we should do some testing to make sure it doesn't break things.

We can do the second at a period of low traffic, although we should do some testing to make sure it doesn't break things.

Maybe it is also a good idea to wait for the new host (with SSDs) to be the master, so it will also run faster

Marostegui changed the task status from Open to Stalled.Mar 8 2019, 2:34 PM

Maybe rather than stall it (or in addition), you can block it on a -presumably new- task to purchase such host?

Those replacements are already in place, we are just waiting for them to be racked: T211613: rack/setup/install db11[26-38].eqiad.wmnet

Marostegui moved this task from Backlog to In progress on the Schema-change-in-production board.

This is similar (and on a smaller table) than T143763, so this can probably follow the same procedure and can be done one day in the morning.

Marostegui changed the task status from Stalled to Open.Apr 8 2019, 7:05 AM
Marostegui moved this task from Pending comment to In progress on the DBA board.

Change 502154 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Depool all x1 slaves

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

Change 502154 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Depool all x1 slaves

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

Mentioned in SAL (#wikimedia-operations) [2019-04-08T07:18:57Z] <marostegui@deploy1001> Synchronized wmf-config/db-eqiad.php: Depool all slaves in x1 T217453 (duration: 00m 59s)

Mentioned in SAL (#wikimedia-operations) [2019-04-08T07:19:08Z] <marostegui> Deploy schema change on the first 10 wikis - T217453

Altered the first 10 wikis, and will leave them for a few days just in case:

aawiki
aawikibooks
aawiktionary
abwiki
abwiktionary
acewiki
advisorswiki
advisorywiki
adywiki
afwiki

The table looks like:

Create Table: CREATE TABLE `echo_target_page` (
  `etp_page` int(10) unsigned NOT NULL DEFAULT '0',
  `etp_event` int(10) unsigned NOT NULL DEFAULT '0',
  `etp_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`etp_id`),
  KEY `echo_target_page_page_event` (`etp_page`,`etp_event`),
  KEY `echo_target_page_event` (`etp_event`)
) ENGINE=InnoDB AUTO_INCREMENT=528079 DEFAULT CHARSET=latin1

Mentioned in SAL (#wikimedia-operations) [2019-04-08T07:24:42Z] <marostegui@deploy1001> Synchronized wmf-config/db-eqiad.php: Repool all slaves in x1 T217453 (duration: 00m 58s)

Change 502673 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Depool all x1 slaves

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

Change 502673 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Depool all x1 slaves

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

Mentioned in SAL (#wikimedia-operations) [2019-04-10T06:59:32Z] <marostegui@deploy1001> Synchronized wmf-config/db-eqiad.php: Depool x1 slaves T217453 (duration: 01m 13s)

Mentioned in SAL (#wikimedia-operations) [2019-04-10T06:59:58Z] <marostegui> Deploy schema change on x1 master, with replication, lag will happen on x1 T217453

Mentioned in SAL (#wikimedia-operations) [2019-04-10T10:08:39Z] <marostegui@deploy1001> Synchronized wmf-config/db-eqiad.php: Repool db1120 T217453 (duration: 01m 03s)

Mentioned in SAL (#wikimedia-operations) [2019-04-10T10:14:03Z] <marostegui@deploy1001> Synchronized wmf-config/db-eqiad.php: Repool db1064 T217453 (duration: 00m 59s)