Page MenuHomePhabricator

Run "patch-remove_unique_ref_indices.sql" and phase 1 of "Segregate Reference objects by source wiki." on officewiki
Closed, ResolvedPublic

Description

Run "patch-remove_unique_ref_indices.sql" then phase 1 of "Segregate Reference objects by source wiki." on officewiki.

I checked flow_wiki_ref and flow_ext_ref in production (not all the other tables so far) to see if there are any other discrepancies, which is how I noticed the patch-remove_unique_ref_indices.sql issue as well.


2015-09-02 21:37:11 mw1142 officewiki exception ERROR: [0e0b7b4a] /w/api.php   DBQueryError from line 1131 of /srv/mediawiki/php-1.26wmf21/includes/db/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading?  See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: INSERT  INTO `flow_wiki_ref` (ref_src_wiki,ref_src_workflow_id,ref_src_namespace,ref_src_title,ref_src_object_type,ref_src_object_id,ref_type,ref_target_namespace,ref_target_title) VALUES ('officewiki','>?����9�g','2600','So6nhpnp33j53lnr','post','>?�系Ŝ','link','2','[removed]'),('officewiki','>?����9�g','2600','So6nhpnp33j53lnr','post','>?�系Ŝ','link','0','[removed]'),('officewiki','>?����9�g','2600','So6nhpnp33j53lnr','post','>?�系Ŝ','template','10','[removed]')
Function: Flow\Data\Storage\BasicDbStorage::insert (flow_wiki_ref)
Error: 1054 Unknown column 'ref_src_wiki' in 'field list' (10.64.16.27)

This is presumably because officewiki was enabled after phase 1 was originally run in https://gerrit.wikimedia.org/r/#/c/136280 , this was overlooked, and officewiki is private (the only private wiki to currently use Flow)


Original report:

I'm getting messages like [997e5072] Database query error and [0e0b7b4a] Database query error if I save a post that contains a link, on officewiki.
First reported by Whatamidoing, trying to post at officewiki.
Not reproduceable at mediawiki.org
No errors in webconsole.

EZF8Tfz.png (655×958 px, 52 KB)

Event Timeline

Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity subscribed.
Mattflaschen-WMF renamed this task from Flow post with links on officewiki - database query error to Run phase 1 of "Segregate Reference objects by source wiki." on officewiki.Sep 2 2015, 10:59 PM
Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF set Security to None.
Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF renamed this task from Run phase 1 of "Segregate Reference objects by source wiki." on officewiki to Run "patch-remove_unique_ref_indices.sql" and phase 1 of "Segregate Reference objects by source wiki." on officewiki.Sep 2 2015, 11:10 PM
Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF updated the task description. (Show Details)
jcrespo lowered the priority of this task from Unbreak Now! to Needs Triage.
jcrespo moved this task from Triage to In progress on the DBA board.

I've executed the scripts:

It would be great if in the future you could provide us a link to those scripts. Please note that while the Flow repo will probably the main one for you, it is one of the thousands of repos on wikimedia for me. :-)

Also, if in the future you have another emergency, and it happens to be on a small wiki (in this case, they had 500 rows), and I am not around, contact another operator/deployment team member and you may execute the queries without me.

Adding links to flow on office wiki works for me:
https://office.wikimedia.org/w/index.php?title=Topic:So7txxdv8kosonhf&topic_showPostId=so7txxhrjnt55fxf#flow-post-so7txxhrjnt55fxf

Confirming that I was just able to save a comment with links (https://office.wikimedia.org/wiki/Topic:So84avxzx5v52f48 ) that earlier had resulted in "Database query error" several times. Thanks everyone for the quick fix!

Thank you.

It would be great if in the future you could provide us a link to those scripts. Please note that while the Flow repo will probably the main one for you, it is one of the thousands of repos on wikimedia for me. :-)

Also, if in the future you have another emergency, and it happens to be on a small wiki (in this case, they had 500 rows), and I am not around, contact another operator/deployment team member and you may execute the queries without me.

Will do. Thanks again.

Resolving because I think there is no more work to do, and @Mattflaschen and @Tbayer seem to have validated the fix.