[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add PoolCounter specifically for morelike

2017-07-18 Thread jenkins-bot (Code Review)
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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add PoolCounter specifically for morelike

2017-07-14 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
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
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/05/365405/1

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 ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/365405
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c131cfba86aeb640aa921643d546e8dc774269f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits