BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331326 )

Change subject: Make RefreshLinksJob handle LinksUpdateConstructed hooks doing 
DB writes
......................................................................

Make RefreshLinksJob handle LinksUpdateConstructed hooks doing DB writes

Bug: T153618
Change-Id: Iae52e9225fe132f2aa99e161611bf8258736d38d
(cherry picked from commit 2d4ed16bd8cc70de1742c8b06ec65928971b6b8e)
---
M includes/jobqueue/jobs/RefreshLinksJob.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/331326/1

diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index 5f33ae0..651a332 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -247,6 +247,11 @@
                        $parserOutput
                );
 
+               // For legacy hook handlers doing updates via 
LinksUpdateConstructed, make sure
+               // any pending writes they made get flushed before the 
doUpdate() calls below.
+               // This avoids snapshot-clearing errors in 
LinksUpdate::acquirePageLock().
+               $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
+
                foreach ( $updates as $key => $update ) {
                        // FIXME: This code probably shouldn't be here?
                        // Needed by things like Echo notifications which need

-- 
To view, visit https://gerrit.wikimedia.org/r/331326
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae52e9225fe132f2aa99e161611bf8258736d38d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to