From 9906460241b18b92ece1890dd6cf380c19785339 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 16 Apr 2013 10:16:10 -0700 Subject: [PATCH] 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 --- includes/cache/HTMLCacheUpdate.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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__ ); -- 2.20.1