jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/365405 )
Change subject: Add PoolCounter specifically for morelike
..
Add PoolCounter specifically for morelike
A reduction in the varnish cache hit rate for related articles
led to an overload of the search cluster, because the very expensive
morelike queries were in the same poolcounter as regular search
queries. Split them out into their own pool counter to allow setting
a much lower limit.
Bug: T170648
Change-Id: I8c131cfba86aeb640aa921643d546e8dc774269f
---
M includes/Searcher.php
M tests/jenkins/FullyFeaturedConfig.php
2 files changed, 9 insertions(+), 0 deletions(-)
Approvals:
Smalyshev: Looks good to me, but someone else must approve
jenkins-bot: Verified
DCausse: Looks good to me, approved
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 86901e0..f0bcc1b 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -969,6 +969,7 @@
$poolCounterTypes = [
'regex' => 'CirrusSearch-Regex',
'prefix' => 'CirrusSearch-Prefix',
+ 'more_like' => 'CirrusSearch-MoreLike',
];
foreach ( $poolCounterTypes as $type => $counter ) {
if ( $this->searchContext->isSyntaxUsed( $type ) ) {
diff --git a/tests/jenkins/FullyFeaturedConfig.php
b/tests/jenkins/FullyFeaturedConfig.php
index d682b3a..37fea19 100644
--- a/tests/jenkins/FullyFeaturedConfig.php
+++ b/tests/jenkins/FullyFeaturedConfig.php
@@ -91,6 +91,14 @@
'workers' => 50,
'maxqueue' => 200,
];
+ // Very expensive full text search. Needs to be limited separate
+ // from primary full text Search due to the expense.
+ $wgPoolCounterConf[ 'CirrusSearch-MoreLike' ] = [
+ 'class' => 'PoolCounter_Client',
+ 'timeout' => 5,
+ 'workers' => 50,
+ 'maxqueue' => 200,
+ ];
}
$wgCirrusSearchIndexDeletes = true;
--
To view, visit https://gerrit.wikimedia.org/r/365405
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8c131cfba86aeb640aa921643d546e8dc774269f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson
Gerrit-Reviewer: DCausse
Gerrit-Reviewer: EBernhardson
Gerrit-Reviewer: Gehel
Gerrit-Reviewer: Smalyshev
Gerrit-Reviewer: Tjones
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits