Aaron Schulz has uploaded a new change for review.

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

Change subject: Make refreshLinksJob explicitly check the cache rev ID
......................................................................

Make refreshLinksJob explicitly check the cache rev ID

This is needed if the $useOutdated behavior of ParserCache
is modified per Ibd111bed203dd.

Change-Id: I70806dffba8af255d7cdad7663132b58479f63e3
---
M includes/jobqueue/jobs/RefreshLinksJob.php
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/285449/1

diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index 15ee980..0f3909d 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -185,10 +185,14 @@
                        }
 
                        if ( $page->getTouched() >= $skewedTimestamp || 
$opportunistic ) {
-                               // Something bumped page_touched since this job 
was made
-                               // or the cache is otherwise suspected to be 
up-to-date
+                               // Something bumped page_touched since this job 
was made or the cache is
+                               // otherwise suspected to be up-to-date. As 
long as the cache rev ID matches
+                               // and it reflects the job's triggering change, 
then it is usable.
                                $parserOutput = 
ParserCache::singleton()->getDirty( $page, $parserOptions );
-                               if ( $parserOutput && 
$parserOutput->getCacheTime() < $skewedTimestamp ) {
+                               if ( $parserOutput
+                                       && $parserOutput->getCacheRevisionId() 
== $revision->getId()
+                                       && $parserOutput->getCacheTime() < 
$skewedTimestamp
+                               ) {
                                        $parserOutput = false; // too stale
                                }
                        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70806dffba8af255d7cdad7663132b58479f63e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

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

Reply via email to