From: Aaron Schulz Date: Thu, 24 Sep 2015 18:26:54 +0000 (-0700) Subject: Made HTMLCacheUpdateJob flush the trx between jobs X-Git-Tag: 1.31.0-rc.0~9696^2 X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=commitdiff_plain;h=54bc8ef8249a9ef96bad902fe358ea2cbfc65c52;p=lhc%2Fweb%2Fwiklou.git Made HTMLCacheUpdateJob flush the trx between jobs Bug: T95501 Change-Id: I899c7a0467927dd862c651de6811acdfc340b3db --- diff --git a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php index a9010c25d1..ef9fec04b9 100644 --- a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php +++ b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php @@ -85,8 +85,6 @@ class HTMLCacheUpdateJob extends Job { return; } - $dbw = wfGetDB( DB_MASTER ); - // The page_touched field will need to be bumped for these pages. // Only bump it to the present time if no "rootJobTimestamp" was known. // If it is known, it can be used instead, which avoids invalidating output @@ -100,9 +98,12 @@ class HTMLCacheUpdateJob extends Job { $touchTimestamp = wfTimestampNow(); } + $dbw = wfGetDB( DB_MASTER ); // Update page_touched (skipping pages already touched since the root job). // Check $wgUpdateRowsPerQuery for sanity; batch jobs are sized by that already. foreach ( array_chunk( $pageIds, $wgUpdateRowsPerQuery ) as $batch ) { + $dbw->commit( __METHOD__, 'flush' ); + $dbw->update( 'page', array( 'page_touched' => $dbw->timestamp( $touchTimestamp ) ), array( 'page_id' => $batch,