-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Make Snapshot Deletes Less Racy #54765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7580ede
6fea237
3766083
a0cdd17
36aa15d
7f4deaf
157c938
ecd90a5
7c3a24e
6cd5631
c78ec9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ | |
| import org.elasticsearch.common.io.stream.Writeable; | ||
| import org.elasticsearch.common.unit.TimeValue; | ||
| import org.elasticsearch.common.xcontent.XContentBuilder; | ||
| import org.elasticsearch.repositories.RepositoryData; | ||
| import org.elasticsearch.repositories.RepositoryOperation; | ||
| import org.elasticsearch.snapshots.Snapshot; | ||
|
|
||
|
|
@@ -174,6 +175,8 @@ public Entry(Snapshot snapshot, long startTime, long repositoryStateId) { | |
| this.snapshot = snapshot; | ||
| this.startTime = startTime; | ||
| this.repositoryStateId = repositoryStateId; | ||
| assert repositoryStateId > RepositoryData.EMPTY_REPO_GEN : | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We would incorrectly get a |
||
| "Can't delete based on an empty or unknown repository generation but saw [" + repositoryStateId + "]"; | ||
| } | ||
|
|
||
| public Entry(StreamInput in) throws IOException { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to fork to the generic pool here any more, we instantly move to the cluster state thread now in the snapshots service. We'll use the generic pool there once we have to inspect the repository data