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 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 subscribed.
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.

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]

We have to drop the views on labs, too.

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

We have to drop the views on labs, too.

Done.

@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, 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 subscribed.

I don't see this table on betalabs.

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)?

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.

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