-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Clone Snapshot API #61839
Clone Snapshot API #61839
Conversation
Alrighty @tlrx thanks so much for working through this one! I addressed the last round of comments now and added UTs and and IT for a broken source snapshot as request. Should be good for another look :) |
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.
Thanks for the additional tests, they worth it IMO. Not funny to write but I think it helps to reason about the shard snapshot updating method.
LGTM
server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java
Outdated
Show resolved
Hide resolved
…ice.java Co-authored-by: Tanguy Leroux <[email protected]>
Thanks again Tanguy! |
Adds package level JavaDoc for snapshot clones. Relates elastic#61839
Adds package level JavaDoc for snapshot clones. Relates #61839
Mainly just shortening the diff of elastic#61839 here by moving test utilities to the abstract test case. Also, making use of the now available functionality to simplify existing tests and improve logging in them.
) Small refactoring to shorten the diff with the clone logic in elastic#61839: * Since clones will create a different kind of shard state update that isn't the same request sent by the snapshot shards service (and cannot be the same request because we have no `ShardId`) base the shard state updates on a different class that can be extended to be general enough to accomodate shard clones as well. * Make the update executor a singleton (can't make it an inline lambda as that would break CS update batching because the executor is used as a map key but this change still makes it crystal clear that there's no internal state to the executor) * Make shard state update responses a singleton (can't use TransportResponse.Empty because we need an action response but still it makes it clear that there's no actual response with content here)
* Just some obvious drying up of these super complex tests. * Mainly just shortening the diff of #61839 here by moving test utilities to the abstract test case. Also, making use of the now available functionality to simplify existing tests and improve logging in them.
…63255) Small refactoring to shorten the diff with the clone logic in #61839: * Since clones will create a different kind of shard state update that isn't the same request sent by the snapshot shards service (and cannot be the same request because we have no `ShardId`) base the shard state updates on a different class that can be extended to be general enough to accomodate shard clones as well. * Make the update executor a singleton (can't make it an inline lambda as that would break CS update batching because the executor is used as a map key but this change still makes it crystal clear that there's no internal state to the executor) * Make shard state update responses a singleton (can't use TransportResponse.Empty because we need an action response but still it makes it clear that there's no actual response with content here)
Adds all the scaffolding for snapshot clone request handling and index-to-clone resolution to reduce the diff in elastic#61839 to the bare essentials of the state machine changes for snapshot cloning and relevant tests and give us the opportunity to review the API in isolation.
Adds clone snapshot API to clone part of a snapshot into a new snapshot.
Adds package level JavaDoc for snapshot clones. Relates elastic#61839
Snapshot clone API. Complete except for some TODOs around documentation (and adding HLRC support).