Hello Hashar, jenkins-bot, I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/326962 to review the following change. Change subject: Revert "Use CirrusSearchClientSideSearchTimeout for connection timeout" ...................................................................... Revert "Use CirrusSearchClientSideSearchTimeout for connection timeout" This reverts commit b05d7af07756c1679a4ee43babba1316e82f3153. Change-Id: If9c2e0c1755f4fc302501b1699456b73ad707256 --- M includes/Searcher.php 1 file changed, 3 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/62/326962/1 diff --git a/includes/Searcher.php b/includes/Searcher.php index c47631b..ec9ebe6 100644 --- a/includes/Searcher.php +++ b/includes/Searcher.php @@ -398,7 +398,7 @@ 'docIds' => $docIds, ] ); // Shard timeout not supported on get requests so we just use the client side timeout - $this->connection->setTimeout( $this->getClientTimeout() ); + $this->connection->setTimeout( $this->getTimeout() ); // We use a search query instead of _get/_mget, these methods are // theorically well suited for this kind of job but they are not // supported on aliases with multiple indices (content/general) @@ -442,7 +442,7 @@ 'timeout' => $this->getTimeout(), ]; - $this->connection->setTimeout( $this->getClientTimeout() ); + $this->connection->setTimeout( $queryOptions['timeout'] ); $pageType = $this->connection->getNamespaceType( $this->indexBaseName ); $match = new \Elastica\Query\Match(); $match->setField( 'name', $name ); @@ -647,7 +647,7 @@ $search = new MultiSearch( $this->connection->getClient() ); $search->addSearches( $searches ); - $this->connection->setTimeout( $this->getClientTimeout() ); + $this->connection->setTimeout( $this->getTimeout() ); if ( $this->config->get( 'CirrusSearchMoreAccurateScoringMode' ) ) { $search->setSearchType( \Elastica\Search::OPTION_SEARCH_TYPE_DFS_QUERY_THEN_FETCH ); @@ -908,9 +908,6 @@ return 'CirrusSearch-Search'; } - /** - * @return string search retrieval timeout - */ private function getTimeout() { if ( $this->searchContext->getSearchType() === 'regex' ) { $type = 'regex'; @@ -919,19 +916,6 @@ } return $this->config->getElement( 'CirrusSearchSearchShardTimeout', $type ); - } - - /** - * @return int the client side timeout - */ - private function getClientTimeout() { - if ( $this->searchContext->getSearchType() === 'regex' ) { - $type = 'regex'; - } else { - $type = 'default'; - } - - return $this->config->getElement( 'CirrusSearchClientSideSearchTimeout', $type ); } /** -- To view, visit https://gerrit.wikimedia.org/r/326962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9c2e0c1755f4fc302501b1699456b73ad707256 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: wmf/1.29.0-wmf.5 Gerrit-Owner: DCausse <dcau...@wikimedia.org> Gerrit-Reviewer: Hashar <has...@free.fr> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits