From: Aaron Schulz Date: Tue, 16 Apr 2013 17:16:10 +0000 (-0700) Subject: Use onTransactionIdle() for page invalidations when not using the job queue. X-Git-Tag: 1.31.0-rc.0~19987 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22messagerie%22%29%20.%20%22?a=commitdiff_plain;h=9906460241b18b92ece1890dd6cf380c19785339;p=lhc%2Fweb%2Fwiklou.git Use onTransactionIdle() for page invalidations when not using the job queue. * This will do the page_touched UPDATE in autocommit mode to avoid locking a bunch of titles for some unknown amount of time that depends on how big the transaction is. Change-Id: I6ec16a73c11fbf19c24d2b7fe7d01f91b9dcf33a --- diff --git a/includes/cache/HTMLCacheUpdate.php b/includes/cache/HTMLCacheUpdate.php index 791ae3e8b9..992809efcd 100644 --- a/includes/cache/HTMLCacheUpdate.php +++ b/includes/cache/HTMLCacheUpdate.php @@ -62,7 +62,10 @@ class HTMLCacheUpdate implements DeferrableUpdate { JobQueueGroup::singleton()->push( $job ); JobQueueGroup::singleton()->deduplicateRootJob( $job ); } else { // few backlinks ($count might be off even if 0) - $job->run(); // just do the purge query now + $dbw = wfGetDB( DB_MASTER ); + $dbw->onTransactionIdle( function() use ( $job ) { + $job->run(); // just do the purge query now + } ); } wfProfileOut( __METHOD__ );