-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Make BlobStoreRepository#writeIndexGen API Async #49584
Make BlobStoreRepository#writeIndexGen API Async #49584
Conversation
Preliminary to shorten the diff of elastic#49060. In elastic#49060 we execute cluster state updates during the writing of a new index gen and thus it must be an async API.
Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore) |
@@ -1432,7 +1444,7 @@ public void verify(String seed, DiscoveryNode localNode) { | |||
public String toString() { | |||
return "BlobStoreRepository[" + | |||
"[" + metadata.name() + | |||
"], [" + blobStore() + ']' + | |||
"], [" + blobStore.get() + ']' + |
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.
Not related to the other changes, but this one was weird as it created a side effect (lazy initializing the blobStore
) in the toString
and I added that fix here.
writeIndexGen(updatedRepoData, repositoryStateId, true); | ||
writeUpdatedRepoDataStep.onResponse(updatedRepoData); | ||
}, listener::onFailure); | ||
final ShardGenerations.Builder builder = ShardGenerations.builder(); |
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.
Formatting was just off here (double indent) before and I fixed it in this one.
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.
LGTM
Thanks Nhat! |
Preliminary to shorten the diff of elastic#49060. In elastic#49060 we execute cluster state updates during the writing of a new index gen and thus it must be an async API.
Preliminary to shorten the diff of #49060. In #49060
we execute cluster state updates during the writing of a new
index gen and thus it must be an async API.
NOTE: This change should not have any functional impact whatsoever, it's just a simple API change to shorten the diff of #49060