Page MenuHomePhabricator

Missing index warning not catched forceSearchIndex.php
Closed, ResolvedPublic

Description

On beta cluster, I have added the cawiki and eswiki new wiki. I followed the instruction at https://wikitech.wikimedia.org/wiki/Nova_Resource:Deployment-prep/Add_a_wiki#Step_3_:_Setup_Search to populate the search index. Since they are not created yet, the script spurt a couple Warning that you might want to catch to report a nice error message.

deployment-bastion:~$ mwscript extensions/CirrusSearch/maintenance/forceSearchIndex.php --wiki cawiki --batch-size=50
PHP Warning: Search backend error during sending 1 documents to the content index after 42. IndexMissingException[[cawiki_content] missing] [Called from CirrusSearch\ElasticsearchIntermediary::failure in /mnt/srv/scap-stage-dir/php-master/extensions/CirrusSearch/includes/ElasticsearchIntermediary.php at line 97] in /mnt/srv/scap-stage-dir/php-master/includes/debug/Debug.php on line 303

Warning: Search backend error during sending 1 documents to the content index after 42. IndexMissingException[[cawiki_content] missing] [Called from CirrusSearch\ElasticsearchIntermediary::failure in /mnt/srv/scap-stage-dir/php-master/extensions/CirrusSearch/includes/ElasticsearchIntermediary.php at line 97] in /mnt/srv/scap-stage-dir/php-master/includes/debug/Debug.php on line 303
[ cawiki] Indexed 1 pages ending at 1 at 2/second
Indexed a total of 1 pages at 2/second


Version: unspecified
Severity: normal

Details

Reference
bz67465

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:30 AM
bzimport added a project: CirrusSearch.
bzimport set Reference to bz67465.
bzimport added a subscriber: Unknown Object (MLST).

I blow up / created the indices with:

mwscript extensions/CirrusSearch/maintenance/updateOneSearchIndexConfig.php --wiki eswiki --startOver --indexType general

mwscript extensions/CirrusSearch/maintenance/updateOneSearchIndexConfig.php --wiki eswiki --startOver --indexType content

Then repopulated:

mwscript extensions/CirrusSearch/maintenance/forceSearchIndex.php --wiki eswiki --batch-size=50

So this bug is just about catching the warning nicely.

Why weren't they created? Did addWiki give some kind of error? What was its output?

When creating eswiki and cawiki on both wikis I got a permission denied opening /tmp/mw-UIDGenerator-squidhtcppurge-48 it is only writable by apache, not by mwdeploy. That somehow prevented the index creation.

Unfortunately I killed the terminal backlog in both cases so I am missing the exact stacktrace.

Change 144480 had a related patch set uploaded by Chad:
Bail early when index doesn't exist

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

Change 144480 merged by jenkins-bot:
Bail early when index doesn't exist

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