Page MenuHomePhabricator

ukwikimedia_p needs to be removed from meta_p table and production CentralAuth tables
Closed, ResolvedPublic

Description

MariaDB [ukwikimedia_p]> SHOW TABLES;
+-------------------------+
| Tables_in_ukwikimedia_p |
+-------------------------+
...
| revision                |
| revision_userindex      |
...
+-------------------------+
56 rows in set (0.00 sec)

MariaDB [ukwikimedia_p]> DESCRIBE revision_userindex;
ERROR 1356 (HY000): View 'ukwikimedia_p.revision_userindex' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

The revisions are not hidden on the wiki itself, however: https://wikimedia.org.uk/wiki/Special:Contributions/Stinglehammer

Either this needs to be fixed on a DBA level, or we can blacklist this wiki from being queried in XTools. We should probably also spot check other chapters' wikis as well to see if they have the same problem.

Event Timeline

Restricted Application added subscribers: Base, Aklapper. · View Herald TranscriptJul 7 2017, 5:56 PM
MusikAnimal updated the task description. (Show Details)Jul 7 2017, 6:00 PM
MusikAnimal updated the task description. (Show Details)Jul 7 2017, 8:02 PM
Legoktm added a subscriber: Legoktm.Jul 7 2017, 8:18 PM

uk.wikimedia.org is no longer hosted by Wikimedia and was removed from the database lists. Where are you getting the wiki's database name from?

MusikAnimal added a comment.EditedJul 7 2017, 8:21 PM

uk.wikimedia.org is no longer hosted by Wikimedia and was removed from the database lists. Where are you getting the wiki's database name from?

MariaDB [meta_p]> SELECT dbname, url FROM wiki;
+----------------------+-------------------------------------+
| dbname               | url                                 |
+----------------------+-------------------------------------+
...
| ukwikimedia          | https://uk.wikimedia.org            |
...
+----------------------+-------------------------------------+
873 rows in set (0.01 sec)

(on labsdb)

OK, it just needs to be removed from meta_p.

Legoktm renamed this task from ukwikimedia_p revision table is apparently private to ukwikimedia_p needs to be removed from meta_p table.Jul 7 2017, 8:22 PM
Marostegui added subscribers: bd808, Marostegui.

This is probably related: T169488
@bd808 might be able to help here

MusikAnimal updated the task description. (Show Details)Jul 7 2017, 8:29 PM
bd808 triaged this task as Medium priority.Jul 7 2017, 8:34 PM

To clean this up, we should run maintain-meta_p --all-databases --purge on:

  • labsdb1001
  • labsdb1003
  • labsdb1009
  • labsdb1010
  • labsdb1011

It could also be fixed by deleting the single meta_p row, but it seems generally better to use the tools we have built to keep these tables up to date.

chasemp claimed this task.Jul 7 2017, 8:43 PM
chasemp added a subscriber: chasemp.

I'm on duty, I'll run this

chasemp closed this task as Resolved.Jul 7 2017, 8:59 PM
mysql:root@localhost [(none)]> use meta_p;
Database changed
mysql:root@localhost [meta_p]> select * from wiki where dbname='ukwikimedia'\G;
Empty set (0.00 sec)
jrbs added a subscriber: jrbs.Jul 8 2017, 1:20 AM
jrbs added a comment.Jul 8 2017, 1:23 AM

For what it's worth, this is causing errors on XTools' editcounter (and probably wider) for users that had linked their account on this wiki. Error code is error::mq.

For what it's worth, this is causing errors on XTools' editcounter (and probably wider) for users that had linked their account on this wiki. Error code is error::mq.

This sounds like a new bug that should be filed. XTools should probably deal with decommissioned wikis. The current list is at https://noc.wikimedia.org/conf/deleted.dblist

MusikAnimal added a comment.EditedJul 8 2017, 6:42 PM

For what it's worth, this is causing errors on XTools' editcounter (and probably wider) for users that had linked their account on this wiki. Error code is error::mq.

This sounds like a new bug that should be filed. XTools should probably deal with decommissioned wikis. The current list is at https://noc.wikimedia.org/conf/deleted.dblist

So for the global edits section of the edit counter, it's using the API, which is still returning ukwikimedia https://meta.wikimedia.org/w/api.php?action=query&meta=globaluserinfo&guiprop=editcount|merged&guiuser=ClemRutter

Is that intentional? Will former WMF wikis always be listed if a user had their account attached to it? Or maybe we can purge the central auth tables, too?

Mentioned in SAL (#wikimedia-operations) [2017-07-08T22:14:20Z] <bd808> Deleted ukwikimedia records in CentralAuth localuser and localnames tables for T170005.

So for the global edits section of the edit counter, it's using the API, which is still returning ukwikimedia https://meta.wikimedia.org/w/api.php?action=query&meta=globaluserinfo&guiprop=editcount|merged&guiuser=ClemRutter
Is that intentional? Will former WMF wikis always be listed if a user had their account attached to it? Or maybe we can purge the central auth tables, too?

The wiki page on deleting a wiki says that the CentralAuth tables should be cleaned up. I should have looked for this page when I started on T168436: `maintain-meta_p --all-databases` timeout on labsdb1009 contacting uk.wikimedia.org.

$ sql centralauth
(wikiadmin@db1079) [centralauth]> SELECT COUNT(*) FROM localnames WHERE ln_wiki='ukwikimedia';
+----------+
| COUNT(*) |
+----------+
|     3787 |
+----------+
1 row in set (0.01 sec)
$ sql --write centralauth
(wikiadmin@db1062) [centralauth]> DELETE FROM localuser WHERE lu_wiki='ukwikimedia';
Query OK, 3787 rows affected (0.05 sec)

(wikiadmin@db1062) [centralauth]> DELETE FROM localnames WHERE ln_wiki='ukwikimedia';
Query OK, 3787 rows affected (0.07 sec)
Legoktm renamed this task from ukwikimedia_p needs to be removed from meta_p table to ukwikimedia_p needs to be removed from meta_p table and production CentralAuth tables.Jul 9 2017, 3:24 AM
DannyH moved this task from Untriaged to Archive on the Community-Tech board.Jul 18 2017, 10:44 PM
MusikAnimal moved this task from Inbox to Complete on the XTools board.Jul 23 2017, 7:48 PM