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

Prepare Snapshot Shard State Update Logic For Clone Logic (#62617) #63255

Merged
merged 1 commit into from
Oct 5, 2020

Conversation

original-brownbear
Copy link
Member

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)

backport of #62617

)

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 original-brownbear added :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs backport labels Oct 5, 2020
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Oct 5, 2020
@original-brownbear original-brownbear merged commit 51d0ed1 into elastic:7.x Oct 5, 2020
@original-brownbear original-brownbear deleted the 62617-7.x branch October 5, 2020 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants