Closed
Description
In some cases where files are deleted/lost from a snapshot, Elastic search can go into infinite loop or never return answer to restoreSnapshot request.
Steps to reproduce:
Missing segment file:
- Create an index with multiple shards and index a few documents
- Create a snapshot of this index
- In the snapshot folder delete one of the segment files for one shard
- Restore this index from the snapshot with setWaitForCompletion(true).execute().actionGet();
- The corruption is detected but the ListenableActionFuture never returns.
Missing index data:
- Create an index with multiple shards and index a few documents
- Create a snapshot of this index
- In the snapshot folder delete each of the shard folders but let the metadata file called "snapshot-snapshot name"
- Restore this index from the snapshot with setWaitForCompletion(false);
- The restore task seems to go in an infinite loop.