Compute latest snapshot directly in TransportGetShardSnapshotAction#76254
Merged
fcofdez merged 4 commits intoelastic:masterfrom Aug 11, 2021
Merged
Compute latest snapshot directly in TransportGetShardSnapshotAction#76254fcofdez merged 4 commits intoelastic:masterfrom
fcofdez merged 4 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-distributed (Team:Distributed) |
DaveCTurner
approved these changes
Aug 10, 2021
| SnapshotInfo latestSnapshot = null; | ||
| for (String workingRepoName : workingRepoNames) { | ||
| createSnapshot(workingRepoName, "empty-snap", Collections.singletonList(indexName)); | ||
| latestSnapshot = createSnapshot(workingRepoName, "empty-snap-" + snapshotIdx++, Collections.singletonList(indexName)); |
Member
There was a problem hiding this comment.
I'm fine with giving all the snapshots unique names, but I'm curious whether this was necessary (and why).
Contributor
Author
There was a problem hiding this comment.
These snapshots can take a short time to finish and some might overlap, in that case we need some tie breaker and I decided to use the name.
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/part-1 |
Contributor
Author
|
@elasticmachine run tests |
Contributor
Author
|
@elasticmachine update branch |
fcofdez
added a commit
to fcofdez/elasticsearch
that referenced
this pull request
Aug 11, 2021
fcofdez
added a commit
that referenced
this pull request
Aug 11, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #75840 now we compute the latest snapshot directly in
TransportGetShardSnapshotActionandGetShardSnapshotResponsejust contains the latest snapshot for the shard.I used the
snapshotIdas a tiebreaker for the snapshot ordering, even though I think that should be rare enough outside of tests.Relates #73496