Page MenuHomePhabricator

deleteLinks jobs reliably fail due to pageId = 0
Closed, ResolvedPublic

Description

Originally reported at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#Cascading_protection_glitch

It appears that the code added in https://gerrit.wikimedia.org/r/#/c/240155/ to do deletion links table updates is adding the jobs with pageId = 0 rather than the page_id associated with the LinksDeletionUpdate, so the job does not successfully run.

2015-10-13 09:04:08 mw1007 enwiki runJobs DEBUG: deleteLinks File:Onion_Powder,_Penzeys_Spices,_Arlington_Heights_MA.jpg pageId=0 (uuid=de10c53df37946f59c67265a716e4cb0,timestamp=1444727048,QueuePartition=rdb2) STARTING  
2015-10-13 09:04:08 mw1007 enwiki runJobs ERROR: deleteLinks File:Onion_Powder,_Penzeys_Spices,_Arlington_Heights_MA.jpg pageId=0 (uuid=de10c53df37946f59c67265a716e4cb0,timestamp=1444727048,QueuePartition=rdb2) t=3 error=MWException: Page ID not known, perhaps the page doesn't exist?

I see lots of entries like this in exception.log.

Event Timeline

Anomie raised the priority of this task from to Needs Triage.
Anomie updated the task description. (Show Details)
Anomie added subscribers: Anomie, aaron.

Change 246678 had a related patch set uploaded (by Anomie):
Use specified pageId for LinksDeletionUpdate→DeleteLinksJob

https://gerrit.wikimedia.org/r/246678

After some further analysis, it seems that this is only occurring for file deletions in 1.27.0-wmf.2, and for all deletions in 1.27.0-wmf.3. That's likely due to https://gerrit.wikimedia.org/r/#/c/242649/2/includes/page/WikiPage.php: before that change, as long as the transaction was already idle (which is the common case, file deletion being the exception) the enqueuing of the jobs would happen inside WikiPage::doDeleteUpdates before the reset of the WikiPage's mId a few lines later (by the call to loadFromRow). After the change, the enqueuing doesn't happen until DeferredUpdates are processed at the end of the request, long after the WikiPage has reset its mId.

Change 246678 merged by jenkins-bot:
Use specified pageId for LinksDeletionUpdate→DeleteLinksJob

https://gerrit.wikimedia.org/r/246678

Scheduled for backporting in Monday morning's SWAT.

Change 247267 had a related patch set uploaded (by Anomie):
Use specified pageId for LinksDeletionUpdate→DeleteLinksJob

https://gerrit.wikimedia.org/r/247267

Change 247268 had a related patch set uploaded (by Anomie):
Use specified pageId for LinksDeletionUpdate→DeleteLinksJob

https://gerrit.wikimedia.org/r/247268

Change 247267 merged by jenkins-bot:
Use specified pageId for LinksDeletionUpdate→DeleteLinksJob

https://gerrit.wikimedia.org/r/247267

Change 247268 merged by jenkins-bot:
Use specified pageId for LinksDeletionUpdate→DeleteLinksJob

https://gerrit.wikimedia.org/r/247268

Anomie claimed this task.

Backports have been deployed.

Once it is deployed, is missing deletions will be deleted manually/maintenance script?

They should be automatically cleaned up the first week of November when the monthly runs of refreshLinks.php --dfn-only happen. That could be manually run sooner, if someone wants to file a Wikimedia-Site-requests bug for it.