Page MenuHomePhabricator

mw_cirrus_metastore should not be recreated so easily
Closed, ResolvedPublic

Description

It happened during a small network outage on a single elastic node, the mw_cirrus_metastore was recreated because the cirrus maint script thought it was gone.
We should strengthen this process either by disabling index autocreation in such scripts and fail or by finding better ways to assert that an index does not exist.

Details

Related Gerrit Patches:
mediawiki/extensions/CirrusSearch : masterDon't allow creating metastore from saneitizeJobs.php

Event Timeline

dcausse created this task.Oct 21 2016, 9:45 AM
Restricted Application edited projects, added Discovery-Search; removed Discovery-Search (Current work). · View Herald TranscriptOct 21 2016, 9:45 AM
MaxSem moved this task from Needs triage to Search on the Discovery board.Oct 26 2016, 9:25 PM

It seems the right solution here is to only create the metastore index when explicitly asked to via either the metastore.php maintenance script or as part of UpdateOneSearchIndexConfig. As far as i understand it, the only change required would be in saneitizeJobs.php. That script would now need to fail if the metastore hasn't been created, rather than allowing the MetaStoreIndex class to attempt to create it.

I suppose upgrades are an open question, should major upgrades (which create a new index, re-point the alias, and delete the old one) also be rejected from outside maintenance scripts that have the primary purpose of creating indices?

Change 320309 had a related patch set uploaded (by EBernhardson):
Don't allow creating metastore from saneitizeJobs.php

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

Change 320309 merged by jenkins-bot:
Don't allow creating metastore from saneitizeJobs.php

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

Deskana closed this task as Resolved.Nov 17 2016, 9:37 PM