Wikidata's wb_items_per_site table dropped

We examine the less than successful stories of the Wikimedia Foundation to create and use technology. The poster boy for this forum is Visual Editor.
User avatar
Giraffe Stapler
Habitué
Posts: 3175
kołdry
Joined: Thu May 02, 2019 5:13 pm

Wikidata's wb_items_per_site table dropped

Unread post by Giraffe Stapler » Tue Apr 07, 2020 11:20 pm

Several complaints at the Village Pump turn out to be caused by the same thing. Apparently if you delete (or "drop") a particular table on Wikidata, it screws things up for all logged-in users. The incident report is worth reading.
Impact: For about 20 minutes, almost all content page parses were broken. They received, along with any other user interaction with the wb_items_per_site table in some way, a database error message instead of page content. This affected many (but not all or even most) page views for logged-in users, and many (possibly most, but not all) edits made to wikis. For 19 hours, all users looking at pages rendered since the incident start received some incorrect metadata on pageviews (infobox content, cross-language links, wikdata item relation). Also, Wikidata's checks for duplicate site links failed, leading to many hundreds of duplicate items being created.

Cause: Wikidata's wb_items_per_site secondary table, used for the rendering of every page connected to Wikidata, was dropped by a mis-configured weekly cron script which executed the update.php code path, which itself had been misconfigured for eight years to drop this table. This immediately led to a DBQueryError on content page loads (reads). The table was re-created as blank, at which point pages began to paint again (though wrongly).

User avatar
Vigilant
Sonny, I've got a whole theme park full of red delights for you.
Posts: 31880
Joined: Thu Mar 29, 2012 8:16 pm
Wikipedia User: Vigilant
Wikipedia Review Member: Vigilant

Re: Wikidata's wb_items_per_site table dropped

Unread post by Vigilant » Wed Apr 08, 2020 12:04 am

Sounds like something that absolutely could have been tested for.
Hello, John. John, hello. You're the one soul I would come up here to collect myself.

User avatar
Osborne
Habitué
Posts: 1259
Joined: Thu Aug 01, 2019 8:29 pm

Re: Wikidata's wb_items_per_site table dropped

Unread post by Osborne » Thu Apr 09, 2020 1:56 pm

Vigilant wrote:
Wed Apr 08, 2020 12:04 am
Sounds like something that absolutely could have been tested for.
What is "testing"? -- unidentified WMF developer

User avatar
Dysklyver
Cornishman
Posts: 2337
Joined: Sun Nov 26, 2017 2:02 pm
Actual Name: Arthur Kerensa
Nom de plume: Dysk
Location: England

Re: Wikidata's wb_items_per_site table dropped

Unread post by Dysklyver » Thu Apr 09, 2020 5:53 pm

One day a misconfiguration will accidentally delete the entire database, and everyone will panic for a day as they restore from a backup.
Globally banned after 7 years.

el84
Gregarious
Posts: 631
Joined: Sun Feb 10, 2019 3:59 pm
Actual Name: Andy E
Location: イギリス

Re: Wikidata's wb_items_per_site table dropped

Unread post by el84 » Thu Apr 09, 2020 6:35 pm

Dysklyver wrote:
Thu Apr 09, 2020 5:53 pm
One day a misconfiguration will accidentally delete the entire database, and everyone will panic for a day as they restore from a backup.
Which will lead to a massive RfC, RfArb etc., because the ''''''wrong'''''' version was restored.

User avatar
Poetlister
Genius
Posts: 25599
Joined: Wed Jan 02, 2013 8:15 pm
Nom de plume: Poetlister
Location: London, living in a similar way

Re: Wikidata's wb_items_per_site table dropped

Unread post by Poetlister » Thu Apr 09, 2020 9:35 pm

el84 wrote:
Thu Apr 09, 2020 6:35 pm
Dysklyver wrote:
Thu Apr 09, 2020 5:53 pm
One day a misconfiguration will accidentally delete the entire database, and everyone will panic for a day as they restore from a backup.
Which will lead to a massive RfC, RfArb etc., because the ''''''wrong'''''' version was restored.
Is there an ArbCom on Wikidata?
"The higher we soar the smaller we appear to those who cannot fly" - Nietzsche

Death To Wikipedia
Regular
Posts: 307
Joined: Thu Apr 09, 2020 4:00 pm
Wikipedia User: all of them

Re: Wikidata's wb_items_per_site table dropped

Unread post by Death To Wikipedia » Fri Apr 10, 2020 9:58 am

The last major outage of Wikipedia was also, iirc, caused by a configuration problem during a supposedly routine software update, the sort of thing that gets spotted in professional code/change review.

To be honest, it's a wonder it stays up so long at all, given the amateurs involved are not really the best the voluntary sector has to offer, and the paid staff are most certainly not the cream of the crop, not remotely what you would find running such a huge website ordinarily.

Kudos for their level of transparency though, it must be so tempting to try and cover these things up and hope their slack-jawed edit-slaves blame it on the NSA or Putin's little green men.

Keep donating guys. You're not wasting your money at all. :applause:
"smarter than the average poster here" - The Trustee
"crazy fool" - The Administrator
"quite the catch" - Ms. Katie