Dangling Indices should not be imported if a tombstone exists for the same Index UUID #18249
Labels
>bug
:Distributed/Distributed
A catch all label for anything in the Distributed Area. If you aren't sure, use this one.
v5.0.0-alpha3
A somewhat rare but nevertheless problematic scenario can occur if a data folder containing a deleted index is copied over to a node. Imagine the following steps:
A
A
creates an index calledidx
with UUIDxyz
.A
is copied to some external location.idx
is deleted from the cluster.B
in the clusterB
has started up, copy the data directory previous put in an external location to the data directory forB
C
, just in order to trigger a cluster state update.At this point, the previously deleted
idx
with UUIDxyz
is imported into the index as a dangling index, even though a tombstone exists for it in the cluster state. This leads to a very confusing situation where the index exists in the cluster state and at the same time, there is a tombstone for it. Also, when the node restarts, it will check the tombstones, see the index is deleted, so delete it - that means the index re-appeared in the cluster state for some time but will be deleted again upon node restart.Also, note that this problem does not occur if the data directory is copied before
B
is started, because in that case on node startup, the tombstones are checked so the index is not permitted to be imported as dangling.The text was updated successfully, but these errors were encountered: