forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Snapshot Delete Needlessly Failing on Concurrent Snapshot
We do the delete in three steps here: 1. Get the repository data and find the snapshot ids to delete 2. Put the delete entry in the CS 3. Run the actual delete The test `testConcurrentSnapshotCreateAndDeleteOther` was failing because between `1.` and `2.` a full snapshot completed moving the repository generation ahead by 1 which we chose to fail on because we expect the repository generation from step `1.` to still be there in step `3.`. In the past, using the repository generation from step `1.` made sense as a safety measure because any rapid increase in repository generation could have spelled trouble on eventually consistent blob stores. Nowadays, it's just needless to fail here though and we can simply rely on the generation we read from the repository in step `3.` to avoid ever passing a broken repository generation to the repository when deleting. NOTE: This exception was always a possibility but became massively more likely due to improved/faster snapshot finalization via elastic#55276 so it only showed up now. Closes elastic#55702
- Loading branch information
1 parent
bd22ab2
commit 0f7ad40
Showing
4 changed files
with
85 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters