A write alias targeting multiple indices prevents node startup #56186
Labels
>bug
:Data Management/Indices APIs
APIs to create and manage indices and templates
Team:Data Management
Meta label for data/management team
In 6.x (and earlier) it is possible for a node to fail to start because its on-disk cluster state marks multiple indices as the target of writes for an alias:
This is fundamentally because each node builds its own copy of the cluster state greedily based on all the index metadata that it can find, but there's no guarantee that it finds a consistent set of metadata. For instance, if the node were shut down while persisting a cluster state then it may have only updated some of the index metadata on disk. Perhaps more commonly, when all shards of an index are moved away from a master-ineligible node then that node stops updating the corresponding index metadata, but does not delete the index metadata immediately so it may contain some very stale alias information (with thanks to @henningandersen for noticing that).
7.x (and later) are not directly affected by this problem since #32006 ensures that cluster states are written atomically so we always see a consistent set of index metadata, although a 7.x node can still encounter this broken state during an upgrade from 6.x.
One possible fix is that we could permit a write alias to target multiple indices (but to reject any indexing to that alias until the ambiguity is resolved). I'm open to other ideas.
The text was updated successfully, but these errors were encountered: