OpenSearch/core
Tanguy Leroux bd9daf422e
Do not start snapshots that are deleted during initialization (#27931)
When a new snapshot is created it is added to the cluster state as a
snapshot-in-progress in INIT state, and the initialization is kicked
off in a new runnable task by SnapshotService.beginSnapshot(). The
initialization writes multiple files before updating the cluster state
to change the snapshot-in-progress to STARTED state. This leaves a
short window in which the snapshot could be deleted (let's say, because
the snapshot is stuck in INIT or because it takes too much time to
upload all the initialization files for all snapshotted indices). If
the INIT snapshot is deleted, the snapshot-in-progress becomes ABORTED
but once the initialization in SnapshotService.beginSnapshot() finished
it is change back to STARTED state again.

This commit avoids an ABORTED snapshot to be started if it has been
deleted during initialization. It also adds a test that would have failed
with the previous behavior, and changes few method names here and there.
2017-12-22 12:59:36 +01:00
..
cli Fix publication of elasticsearch-cli to Maven 2017-12-17 11:51:18 -05:00
licenses Upgrade to Lucene 7.2.0. (#27910) 2017-12-20 14:17:40 +01:00
src Do not start snapshots that are deleted during initialization (#27931) 2017-12-22 12:59:36 +01:00
build.gradle Tighten which classes can exit 2017-11-21 16:37:41 -05:00