X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fjobqueue%2Fjobs%2FRefreshLinksJob.php;h=f9284a57ceb81fee72c878620ff3f10d257945e5;hp=5f33ae045e04d5296ae6f434b91feedafb003a24;hb=49748181dd56ec97e7ba7c13e684a16abceb3cc0;hpb=5784897e2e1099722c2f910fb491b46a28c94551 diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index 5f33ae045e..f9284a57ce 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -29,7 +29,7 @@ use MediaWiki\MediaWikiServices; * - a) Recursive jobs to update links for backlink pages for a given title. * These jobs have (recursive:true,table:) set. * - b) Jobs to update links for a set of pages (the job title is ignored). - * These jobs have (pages:(:(,),...) set. + * These jobs have (pages:(<page ID>:(<namespace>,<title>),...) set. * - c) Jobs to update links for a single page (the job title) * These jobs need no extra fields set. * @@ -247,6 +247,11 @@ class RefreshLinksJob extends Job { $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