From ed20c833bfe6423201806e859f963f0b57bff462 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 14 Sep 2017 15:43:53 +0200 Subject: [PATCH] Avoid per-title page_lang DB queries HTMLCacheUpdateJob Change-Id: Ie2fa64400f05d90e615bd8ff26225e197605d244 --- includes/jobqueue/jobs/HTMLCacheUpdateJob.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php index 0aa33cac18..e8edab59b4 100644 --- a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php +++ b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php @@ -103,7 +103,7 @@ class HTMLCacheUpdateJob extends Job { * @param array $pages Map of (page ID => (namespace, DB key)) entries */ protected function invalidateTitles( array $pages ) { - global $wgUpdateRowsPerQuery, $wgUseFileCache; + global $wgUpdateRowsPerQuery, $wgUseFileCache, $wgPageLanguageUseDB; // Get all page IDs in this query into an array $pageIds = array_keys( $pages ); @@ -145,7 +145,10 @@ class HTMLCacheUpdateJob extends Job { // Get the list of affected pages (races only mean something else did the purge) $titleArray = TitleArray::newFromResult( $dbw->select( 'page', - [ 'page_namespace', 'page_title' ], + array_merge( + [ 'page_namespace', 'page_title' ], + $wgPageLanguageUseDB ? [ 'page_lang' ] : [] + ), [ 'page_id' => $pageIds, 'page_touched' => $dbw->timestamp( $touchTimestamp ) ], __METHOD__ ) ); -- 2.20.1