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.
Prevent duplicate snapshot names after failure
Today we prevent creating a shard snapshot whose name matches one that already exists (elastic#29634) but it's possible to end up with duplicate snapshot names anyway if the `index-N` file is unreadable and the fallback which reads all the `snap-UUID.dat` files encounters two with the same name, perhaps due to some earlier failure. This results in writing a broken `index-N` file that contains duplicate keys, which completely breaks the repository. This commit fails the shard snapshot without writing the broken `index-N` file in this situation, on the assumption that the unreadability of the existing `index-N` file is only temporary.
- Loading branch information
1 parent
12774bc
commit f0f9b3a
Showing
2 changed files
with
66 additions
and
0 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