* The condition timestamp should be the root job timestamp,
as the comments imply, though that was not the case. Only
the SET timestamp should be the current timestamp. As it
was, jobs effectively did not "see" each other since each
one would be expecting newer than the ones that ran prior.
The page_touched condition for the UPDATE query was mostly
useless, since it was always the current timestamp.
* This problem was a regression from
f598ca81e3f40166.
Change-Id: I1398366e87c959be1c98e4db959c41309b0ac1b8
// before the link jobs, so using the current timestamp instead of the root timestamp is
// not expected to invalidate these cache entries too often.
$touchTimestamp = wfTimestampNow();
+ // If page_touched is higher than this, then something else already bumped it after enqueue
+ $condTimestamp = isset( $this->params['rootJobTimestamp'] )
+ ? $this->params['rootJobTimestamp']
+ : $touchTimestamp;
$dbw = wfGetDB( DB_MASTER );
$factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
[ 'page_touched' => $dbw->timestamp( $touchTimestamp ) ],
[ 'page_id' => $batch,
// don't invalidated pages that were already invalidated
- "page_touched < " . $dbw->addQuotes( $dbw->timestamp( $touchTimestamp ) )
+ "page_touched < " . $dbw->addQuotes( $dbw->timestamp( $condTimestamp ) )
],
__METHOD__
);