Made LinksUpdate::updateLinksTimestamp() use a more correct timestamp
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 30 Jan 2014 22:13:08 +0000 (14:13 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 30 Jan 2014 22:13:12 +0000 (14:13 -0800)
* This can matter if page Y uses templates A and B, someone edits A,
  someone edits Y, someone edits B, an A-refreshLinks job on Y runs
  (using cache), then a B-refreshLinks job runs on Y. Previously,
  the later job could incorrectly no-op itself due to the high
  page_links_updated value on Y.

Change-Id: I984d2d1fc5aa075f3e3ead4921deaffbdc20e963

includes/deferred/LinksUpdate.php

index 8c3b671..01555ff 100644 (file)
@@ -869,8 +869,10 @@ class LinksUpdate extends SqlDataUpdate {
         */
        protected function updateLinksTimestamp() {
                if ( $this->mId ) {
+                       // The link updates made here only reflect the freshness of the parser output
+                       $timestamp = $this->mParserOutput->getCacheTime();
                        $this->mDb->update( 'page',
-                               array( 'page_links_updated' => $this->mDb->timestamp() ),
+                               array( 'page_links_updated' => $this->mDb->timestamp( $timestamp ) ),
                                array( 'page_id' => $this->mId ),
                                __METHOD__
                        );