Page MenuHomePhabricator

Expand the check of table catalog to detect tables where they shouldn't be
Open, MediumPublic

Description

We currently check for tables catalog and ignore the "database", "dblist" and so on. It is important to look in dbs to make sure tables exist only where they are supposed to. For example, we had cases of FlaggedRevs uninstalled in frwiki but tables were not fully dropped.

P78808 is the original script running on stat machines.

Event Timeline

Ladsgroup triaged this task as Medium priority.
Ladsgroup moved this task from Triage to In progress on the DBA board.

1table exists where it should not: flaggedpage_config frwiki
2table exists where it should not: flaggedpages frwiki
3table exists where it should not: flaggedrevs frwiki
4table exists where it should not: flaggedrevs_promote frwiki
5table exists where it should not: flaggedrevs_statistics frwiki
6table exists where it should not: flaggedrevs_tracking frwiki
7table exists where it should not: thread labswiki
8table exists where it should not: thread_history labswiki
9table exists where it should not: thread_pending_relationship labswiki
10table exists where it should not: thread_reaction labswiki
11table exists where it should not: user_message_state labswiki
12table exists where it should not: cn_assignments idwikivoyage
13table exists where it should not: cn_known_devices idwikivoyage
14table exists where it should not: cn_known_mobile_carriers idwikivoyage
15table exists where it should not: cn_notice_countries idwikivoyage
16table exists where it should not: cn_notice_languages idwikivoyage
17table exists where it should not: cn_notice_log idwikivoyage
18table exists where it should not: cn_notice_mixin_params idwikivoyage
19table exists where it should not: cn_notice_mixins idwikivoyage
20table exists where it should not: cn_notice_mobile_carriers idwikivoyage
21table exists where it should not: cn_notice_regions idwikivoyage
22table exists where it should not: cn_notices idwikivoyage
23table exists where it should not: cn_template_devices idwikivoyage
24table exists where it should not: cn_template_log idwikivoyage
25table exists where it should not: cn_template_mixins idwikivoyage
26table exists where it should not: cn_templates idwikivoyage
27table exists where it should not: globalimagelinks idwikivoyage
28table exists where it should not: cn_assignments kncwiki
29table exists where it should not: cn_known_devices kncwiki
30table exists where it should not: cn_known_mobile_carriers kncwiki
31table exists where it should not: cn_notice_countries kncwiki
32table exists where it should not: cn_notice_languages kncwiki
33table exists where it should not: cn_notice_log kncwiki
34table exists where it should not: cn_notice_mixin_params kncwiki
35table exists where it should not: cn_notice_mixins kncwiki
36table exists where it should not: cn_notice_mobile_carriers kncwiki
37table exists where it should not: cn_notice_regions kncwiki
38table exists where it should not: cn_notices kncwiki
39table exists where it should not: cn_template_devices kncwiki
40table exists where it should not: cn_template_log kncwiki
41table exists where it should not: cn_template_mixins kncwiki
42table exists where it should not: cn_templates kncwiki
43table exists where it should not: globalimagelinks kncwiki
44table exists where it should not: cn_assignments satwiktionary
45table exists where it should not: cn_known_devices satwiktionary
46table exists where it should not: cn_known_mobile_carriers satwiktionary
47table exists where it should not: cn_notice_countries satwiktionary
48table exists where it should not: cn_notice_languages satwiktionary
49table exists where it should not: cn_notice_log satwiktionary
50table exists where it should not: cn_notice_mixin_params satwiktionary
51table exists where it should not: cn_notice_mixins satwiktionary
52table exists where it should not: cn_notice_mobile_carriers satwiktionary
53table exists where it should not: cn_notice_regions satwiktionary
54table exists where it should not: cn_notices satwiktionary
55table exists where it should not: cn_template_devices satwiktionary
56table exists where it should not: cn_template_log satwiktionary
57table exists where it should not: cn_template_mixins satwiktionary
58table exists where it should not: cn_templates satwiktionary
59table exists where it should not: globalimagelinks satwiktionary
60table exists where it should not: cn_assignments sylwiki
61table exists where it should not: cn_known_devices sylwiki
62table exists where it should not: cn_known_mobile_carriers sylwiki
63table exists where it should not: cn_notice_countries sylwiki
64table exists where it should not: cn_notice_languages sylwiki
65table exists where it should not: cn_notice_log sylwiki
66table exists where it should not: cn_notice_mixin_params sylwiki
67table exists where it should not: cn_notice_mixins sylwiki
68table exists where it should not: cn_notice_mobile_carriers sylwiki
69table exists where it should not: cn_notice_regions sylwiki
70table exists where it should not: cn_notices sylwiki
71table exists where it should not: cn_template_devices sylwiki
72table exists where it should not: cn_template_log sylwiki
73table exists where it should not: cn_template_mixins sylwiki
74table exists where it should not: cn_templates sylwiki
75table exists where it should not: globalimagelinks sylwiki
76table exists where it should not: cn_assignments tigwiki
77table exists where it should not: cn_known_devices tigwiki
78table exists where it should not: cn_known_mobile_carriers tigwiki
79table exists where it should not: cn_notice_countries tigwiki
80table exists where it should not: cn_notice_languages tigwiki
81table exists where it should not: cn_notice_log tigwiki
82table exists where it should not: cn_notice_mixin_params tigwiki
83table exists where it should not: cn_notice_mixins tigwiki
84table exists where it should not: cn_notice_mobile_carriers tigwiki
85table exists where it should not: cn_notice_regions tigwiki
86table exists where it should not: cn_notices tigwiki
87table exists where it should not: cn_template_devices tigwiki
88table exists where it should not: cn_template_log tigwiki
89table exists where it should not: cn_template_mixins tigwiki
90table exists where it should not: cn_templates tigwiki
91table exists where it should not: globalimagelinks tigwiki
92table exists where it should not: revsrc aswikisource
93table exists where it should not: srcwork aswikisource
94table exists where it should not: swsite aswikisource
95table exists where it should not: flaggedpage_config bawiki
96table exists where it should not: flaggedpages bawiki
97table exists where it should not: flaggedrevs bawiki
98table exists where it should not: flaggedrevs_promote bawiki
99table exists where it should not: flaggedrevs_statistics bawiki
100table exists where it should not: flaggedrevs_tracking bawiki
101table exists where it should not: pr_index frrwiki
102table exists where it should not: wikilove_log hiwikisource
103table exists where it should not: oauth2_access_tokens mediawikiwiki
104table exists where it should not: oauth_accepted_consumer mediawikiwiki
105table exists where it should not: oauth_registered_consumer mediawikiwiki
106table exists where it should not: revtag officewiki
107table exists where it should not: translate_cache officewiki
108table exists where it should not: translate_groupreviews officewiki
109table exists where it should not: translate_groupstats officewiki
110table exists where it should not: translate_message_group_subscriptions officewiki
111table exists where it should not: translate_messageindex officewiki
112table exists where it should not: translate_metadata officewiki
113table exists where it should not: translate_reviews officewiki
114table exists where it should not: translate_sections officewiki
115table exists where it should not: translate_translatable_bundles officewiki
116table exists where it should not: flaggedpage_config siwiki
117table exists where it should not: flaggedpages siwiki
118table exists where it should not: flaggedrevs siwiki
119table exists where it should not: flaggedrevs_promote siwiki
120table exists where it should not: flaggedrevs_statistics siwiki
121table exists where it should not: flaggedrevs_tracking siwiki
122table exists where it should not: pr_index sourceswiki
123table exists where it should not: pr_index test2wiki
124table exists where it should not: wikifunctionsclient_usage test2wiki
125table exists where it should not: thread wikimania2011wiki
126table exists where it should not: thread_history wikimania2011wiki
127table exists where it should not: user_message_state wikimania2011wiki

They are mostly either: 1- Undeployed extension in one wiki (e.g. flaggedrevs in frwiki) or 2- T397348: addWiki.php create tables it should not

Mentioned in SAL (#wikimedia-operations) [2025-07-29T11:56:46Z] <Amir1> dropping flaggedrevs tables in frwiki, bawiki, siwiki (T398944)