Skip to content
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

Merged

Conversation

original-brownbear
Copy link
Member

@original-brownbear original-brownbear commented Sep 2, 2020

Snapshot clone API. Complete except for some TODOs around documentation (and adding HLRC support).

@original-brownbear
Copy link
Member Author

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 :)

Copy link
Member

@tlrx tlrx left a 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

@original-brownbear
Copy link
Member Author

Thanks again Tanguy!
Ran this for about 5h at 8x parallelism through all snapshot related test on my local workstation without failure => merging and on it for the last few TODOs :)

@original-brownbear original-brownbear merged commit f7f239d into elastic:master Oct 2, 2020
@original-brownbear original-brownbear deleted the clone-snapshot-on-repo branch October 2, 2020 19:28
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 3, 2020
Adds package level JavaDoc for snapshot clones.
Relates elastic#61839
original-brownbear added a commit that referenced this pull request Oct 5, 2020
Adds package level JavaDoc for snapshot clones.
Relates #61839
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 5, 2020
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.
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 5, 2020
)

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)
original-brownbear added a commit that referenced this pull request Oct 5, 2020
* 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.
original-brownbear added a commit that referenced this pull request Oct 5, 2020
…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)
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 5, 2020
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.
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 5, 2020
Adds clone snapshot API to clone part of a snapshot into a new snapshot.
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 5, 2020
Adds package level JavaDoc for snapshot clones.
Relates elastic#61839
original-brownbear added a commit that referenced this pull request Oct 5, 2020
Snapshot clone API. Complete except for some TODOs around documentation (and adding HLRC support).

backport of #61839, #63217, #63037
@original-brownbear original-brownbear restored the clone-snapshot-on-repo branch December 6, 2020 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v7.10.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants