Page MenuHomePhabricator

Drop DiscussionTools database tables from wikis which don't need them
Closed, ResolvedPublic

Description

Summary

The DiscussionTools tables are not needed on some closed wikis, because the extension is disabled on those wikis

Technical details

  • The following closed wikis have DiscussionTools disabled and so do not need the database tables on those wikis:
Wikis without DiscussionTools
aawiki
aawikibooks
aawiktionary
abwiktionary
advisorywiki
akwiki
akwikibooks
akwiktionary
amwikiquote
angwikibooks
angwikiquote
angwikisource
astwikibooks
astwikiquote
aswikibooks
aswiktionary
avwiktionary
aywikibooks
bgwikinews
bhwiktionary
biwikibooks
biwiktionary
bmwikibooks
bmwikiquote
bmwiktionary
bowikibooks
bowiktionary
chowiki
chwikibooks
chwiktionary
cnwikimedia
cowikibooks
cowikiquote
crwikiquote
crwiktionary
dzwiktionary
gawikibooks
gawikiquote
gnwikibooks
gotwikibooks
guwikibooks
howiki
htwikisource
huwikinews
hzwiki
iewikibooks
iiwiki
ikwiktionary
internalwiki
kjwiki
kkwikiquote
knwikibooks
krwiki
krwikiquote
kswikibooks
kswikiquote
kwwikiquote
lbwikibooks
lbwikiquote
lnwikibooks
lrcwiki
lvwikibooks
mhwiki
mhwiktionary
miwikibooks
mnwikibooks
muswiki
mywikibooks
nahwikibooks
nawiki
nawikibooks
nawikiquote
ndswikibooks
ndswikiquote
ngwiki
nzwikimedia
pa_uswikimedia
piwiktionary
pswikibooks
qualitywiki
quwikibooks
quwikiquote
rmwikibooks
rmwiktionary
rnwiktionary
scwiktionary
sdwikinews
searchcomwiki
sewikibooks
simplewikibooks
simplewikiquote
snwiktionary
spcomwiki
strategywiki
suwikibooks
swwikibooks
tenwiki
thwikinews
tkwikibooks
tkwikiquote
towiktionary
transitionteamwiki
trwikinews
ttwikiquote
twwiktionary
ugwikibooks
ugwikiquote
usabilitywiki
uzwikibooks
vowikibooks
vowikiquote
wawikibooks
wikimania2005wiki
wikimania2006wiki
wikimania2007wiki
wikimania2008wiki
wikimania2009wiki
wikimania2010wiki
wikimania2011wiki
wikimania2012wiki
wikimania2013wiki
wikimania2014wiki
wikimania2015wiki
wikimania2016wiki
wikimania2017wiki
wikimania2018wiki
wowikiquote
xhwikibooks
xhwiktionary
yowikibooks
yowiktionary
zawikibooks
zawikiquote
zawiktionary
zh_min_nanwikibooks
zh_min_nanwikiquote
zuwikibooks
  • Dropping the tables on these wikis should help reduce the number of database tables on s3 and so help with the performance of that cluster
  • The following databases are in s5:
mhwiktionary
muswiki

Schema change template

  1. ALTERs to run:
    1. RENAME TABLE discussiontools_items TO discussiontools_items_temp; RENAME TABLE discussiontools_item_ids TO discussiontools_item_ids_temp; RENAME TABLE discussiontools_item_pages TO discussiontools_item_pages_temp; RENAME TABLE discussiontools_item_revisions TO discussiontools_item_revisions_temp; RENAME TABLE discussiontools_subscription TO discussiontools_subscription_temp;
    2. DROP TABLE discussiontools_items_temp; DROP TABLE discussiontools_item_ids_temp; DROP TABLE discussiontools_item_pages_temp; DROP TABLE discussiontools_item_revisions_temp; DROP TABLE discussiontools_subscription_temp;
  2. Where to run those changes: See above for the list of wikis
  3. When to run those changes: No particular rush
  4. If the schema change is backwards compatible: No, suggest renaming tables first and then dropping. However, the tables should not be accessed
  5. If the schema change has been tested already on some of the test/beta wikis: N/A
  6. If the data should be made available on the labs replicas and/or dumps: N/A

Event Timeline

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

Looks like discussiontools_subscription is sqooped into the Data Lake. Just checking @MNeisler do we still need this? T290516: Enable topic subscription dashboard to update regularly

Although, this is just dropping the tables from wikis that don't use DiscussionTools. Will that cause a problem for sqoop configs? @JAllemandou @mforns do you know?

This will cause a problem indeed: sqoop will try to gather tables that don't exist and fail.
It is necessary to create a new wiki-list file specific for the specific sqoop job instead of reusing the default one.

No idea what the timeline is, that's for DBA to decide

Marostegui triaged this task as Medium priority.

The rename has been executed, in a few days I'll drop the tables if everything goes well

Mentioned in SAL (#wikimedia-operations) [2026-07-29T09:00:01Z] <marostegui> Dropping renamed tables T426341

Tables dropped from s5 (just two wikis)
And now looping over s3, which will take a bit.