Skip to content

Make BlobStoreRepository#writeIndexGen API Async#49584

Merged
original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear:async-index-gen-write
Nov 26, 2019
Merged

Make BlobStoreRepository#writeIndexGen API Async#49584
original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear:async-index-gen-write

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

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

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.
@original-brownbear original-brownbear added >non-issue :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.6.0 labels Nov 26, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

return "BlobStoreRepository[" +
"[" + metadata.name() +
"], [" + blobStore() + ']' +
"], [" + blobStore.get() + ']' +
Copy link
Copy Markdown
Contributor Author

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();
Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Thanks Nhat!

@original-brownbear original-brownbear merged commit 48ba7dd into elastic:master Nov 26, 2019
@original-brownbear original-brownbear deleted the async-index-gen-write branch November 26, 2019 19:58
original-brownbear added a commit that referenced this pull request Nov 26, 2019
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.
@original-brownbear original-brownbear restored the async-index-gen-write branch August 6, 2020 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue v7.6.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants