From a549313076b45ba80e2c59cb27533011dd21f6bd Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 17 Aug 2017 02:01:30 -0700 Subject: [PATCH] Avoid lock acquisition errors for multi-title refreshlinks jobs Bug: T173462 Change-Id: I9dab9b4e5c4cae7306dc29bad9e62287d54b2281 --- includes/jobqueue/jobs/RefreshLinksJob.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index 02bb829e1a..0c84a139f4 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -279,6 +279,10 @@ class RefreshLinksJob extends Job { InfoAction::invalidateCache( $title ); + // Commit any writes here in case this method is called in a loop. + // In that case, the scoped lock will fail to be acquired. + $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket ); + return true; } -- 2.20.1