Page MenuHomePhabricator

Drop `user_daily_contribs` table from all production wikis
Closed, ResolvedPublic

Description

The extension which managed this table has been decommissioned (see T85984). The table can now be dropped.

Event Timeline

ori created this task.Oct 16 2015, 3:30 PM
ori assigned this task to jcrespo.
ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori added a project: acl*sre-team.
ori added a subscriber: ori.
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptOct 16 2015, 3:30 PM
Krenair added a subscriber: Krenair.
jcrespo triaged this task as Low priority.Oct 19 2015, 5:55 PM
jcrespo moved this task from Triage to Backlog on the DBA board.

Low because it will probably not block anyone. That doesn't mean it will not be done soon, as it is easy.

According to https://gerrit.wikimedia.org/r/#/c/246689/1/wmf-config/InitialiseSettings.php, this should have been enabled on all production wikis.

About to perform a rename of the table to delete_user_daily_contribs on all wikis to verify that it is indeed not used anymore.

There are 30 million rows on these tables (on enwiki, fewer on the others). This makes this a slightly more complex issue due to potential impact on the 5.5 masters. We will have to do it slowly, specially for s1 and s3.

I will also create a backup first.

I have renamed the table on all wikis to delete_user_daily_contribs; I will leave it as is for some time, will delete it afterwards after checking that no code is requiring it.

A backup exists for all tables on iron.

jcrespo moved this task from Backlog to In progress on the DBA board.Oct 20 2015, 2:56 PM
jcrespo closed this task as Resolved.Oct 23 2015, 11:42 AM

This table has been dropped from all dblist wikis.

mysql -A -h s1-master.eqiad.wmnet enwiki -e "SHOW TABLES like '%user_daily_contribs%'"
[no results]
jcrespo reopened this task as Open.Oct 28 2015, 6:23 PM

We have to drop the views on labs, too.

jcrespo added a subscriber: coren.Oct 28 2015, 6:40 PM

Involving @coren because of my last comment (this time, no pressure).

jcrespo moved this task from In progress to Backlog on the DBA board.Oct 29 2015, 12:21 PM
ori closed this task as Resolved.Oct 29 2015, 6:09 PM

We have to drop the views on labs, too.

Done.

jcrespo reopened this task as Open.Nov 2 2015, 8:54 AM

@ori, I do not know that you did here, but you did not delete the views:

mysql -BN -A -h labsdb1001.eqiad.wmnet enwiki_p -e "SHOW TABLES like '%user_daily_contribs%'"
user_daily_contribs

, or modified the script that creates it:

https://git.wikimedia.org/blob/operations%2Fsoftware.git/c97d58551ee8d66605c5262fd0c1b66c74e24acd/maintain-replicas%2Fmaintain-replicas.pl#L84

Reopening and putting it on my backlog.

ori added a comment.Nov 2 2015, 8:57 AM

@ori, I do not know that you did here

Sigh. This has to do with my pathological tendency to confuse labs with beta cluster. I dropped the tables on the beta cluster. Which is not what you were actually asking about, I now realize.

Change 250378 had a related patch set uploaded (by Jcrespo):
Delete user_daily_contribs from the views in labs

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

Change 250378 merged by coren:
Delete user_daily_contribs from the views in labs

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

MaxSem closed this task as Resolved.Nov 5 2015, 7:56 PM
MaxSem added a subscriber: MaxSem.

I don't see this table on betalabs.

jcrespo reopened this task as Open.Nov 23 2015, 5:59 PM

This wasn't done, labs is not fixed yet.

Finally, I have deleted all tables and view referencing this table and I am ready to close.

One last thing, @ori, I saw the table bing recreated on vewikimedia production. Can you make sure references to that table on code are vanished and it is not recreated? I assume it was a "human race condition", by which it was recreated while it was being deleted and I had an old copy of dblists, but can you check the fact (the table will not be recreated in the future)?

jcrespo moved this task from Backlog to Done on the DBA board.Nov 24 2015, 11:08 AM

Change 255443 had a related patch set uploaded (by MaxSem):
UserDailyContribs has been undeployed

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

Change 255444 had a related patch set uploaded (by MaxSem):
Don't checkout UserDailyContribs

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

@jcrespo, the above patches should take care of remaining vestiges. The reappeared table is safe to drop at any moment meanwhile.

jcrespo closed this task as Resolved.Nov 26 2015, 8:25 AM

Thanks, @MaxSem. I think this ticket will serve as a checklist of all things needed for a full table deprecation: production drop, and its script, labs drop, labs views drop, and its script, sanitarium triggers, beta drop.

Change 255444 merged by jenkins-bot:
Don't checkout UserDailyContribs

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

Change 255443 merged by jenkins-bot:
UserDailyContribs has been undeployed

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