Page MenuHomePhabricator

updateSuggesterIndex.php tries to recycle non-existing index
Closed, ResolvedPublic

Description

When I try to update suggester index on an install that never had this index before, I get exception:

vagrant@mediawiki-vagrant:/vagrant/mediawiki$ mwscript extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki cirrustestwiki
Fetching Elasticsearch version...1.7.1...ok
Infering index identifier...cirrustestwiki_titlesuggest_1454353233

Unexpected Elasticsearch failure.
Elasticsearch failed in an unexpected way.  This is always a bug in CirrusSearch.
Error type: Elastica\Exception\NotFoundException
Message: doc id cirrustestwiki_titlesuggest not found
Trace:
#0 /vagrant/mediawiki/extensions/CirrusSearch/maintenance/updateSuggesterIndex.php(283): Elastica\Type->getDocument('cirrustestwiki_...')
#1 /vagrant/mediawiki/extensions/CirrusSearch/maintenance/updateSuggesterIndex.php(204): CirrusSearch\Maintenance\UpdateSuggesterIndex->canRecycle()
#2 /vagrant/mediawiki/maintenance/doMaintenance.php(103): CirrusSearch\Maintenance\UpdateSuggesterIndex->execute()
#3 /vagrant/mediawiki/extensions/CirrusSearch/maintenance/updateSuggesterIndex.php(698): require_once('/vagrant/mediaw...')
#4 /var/www/w/MWScript.php(89): require_once('/vagrant/mediaw...')
#5 {main}

Looks like it tries to recycle index that does not exist. If I disable $wgCirrusSearchRecycleCompletionSuggesterIndex it works and then enabling it back works too.

Event Timeline

Smalyshev raised the priority of this task from to Needs Triage.
Smalyshev updated the task description. (Show Details)
Smalyshev added a project: Discovery.
Smalyshev added subscribers: Smalyshev, dcausse, EBernhardson.

Change 267857 had a related patch set uploaded (by DCausse):
Properly check for titlesuggest index presence in mw_cirrus_versions

https://gerrit.wikimedia.org/r/267857

Change 267857 merged by jenkins-bot:
Properly check for titlesuggest index presence in mw_cirrus_versions

https://gerrit.wikimedia.org/r/267857

Deskana triaged this task as Medium priority.
Deskana moved this task from Search to On Sprint Board on the Discovery board.
Deskana added a subscriber: Deskana.