Description
Currently, according to SnapshotsService.deleteSnapshot
, a snapshot deletion request is rejected if there is any restore in progress. The reason given is commented thusly:
// don't allow snapshot deletions while a restore is taking place,
// otherwise we could end up deleting a snapshot that is being restored
// and the files the restore depends on would all be gone
This makes perfect sense, however it doesn't necessarily explain why I can't delete snapshot A while snapshot B is being restored (which currently is forbidden). Would it not be feasible to just check if the snapshot we want to delete is among those snapshots with a restore in progress and allow the deletion if it is not, or is there more to it than the comment suggests?
In my use case, I have a 1-to-1 relationship between indices and snapshots, and being able to restore multiple indices in parallel now is great, but as I also need to be able to delete snapshots after I've restored them (for housekeeping purposes), or indeed just delete them along with the index if I no longer need it, not being able to do so while potentially numerous other indices are being restored (something that is driven by users, not me) is a bit of a drag.