Skip to content

Conversation

@original-brownbear
Copy link
Contributor

Similar to #54395 we know that a snapshot in INIT state has not
written anything to the repository yet. If we see one from a master
failover, there is no point in moving it to ABORTED before removing it
from the cluster state in a subsequent CS update (via endSnapshot).
Instead, we can simply remove its job from the CS the first time
we see it on master failover and be done with it.

Similar to elastic#54395 we know that a snapshot in INIT state has not
written anything to the repository yet. If we see one from a master
failover, there is no point in moving it to ABORTED before removing it
from the cluster state in a subsequent CS update.
Instead, we can simply remove its job from the CS the first time
we see it on master failover and be done with it.
@elasticmachine
Copy link
Collaborator

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

}, updatedSnapshot.repositoryStateId(), false);
// A snapshot in INIT state hasn't yet written anything to the repository so we simply remove it
// from the cluster state without any further cleanup
continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to call continue here?

@original-brownbear
Copy link
Contributor Author

Thanks Yannick!

@original-brownbear original-brownbear merged commit 6c32443 into elastic:master Mar 30, 2020
@original-brownbear original-brownbear deleted the further-simplify-master-failover branch March 30, 2020 15:12
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Apr 15, 2020
…elastic#54420)

* Remove Redundant Cluster State during Snapshot INIT + Master Failover

Similar to elastic#54395 we know that a snapshot in INIT state has not
written anything to the repository yet. If we see one from a master
failover, there is no point in moving it to ABORTED before removing it
from the cluster state in a subsequent CS update.
Instead, we can simply remove its job from the CS the first time
we see it on master failover and be done with it.
original-brownbear added a commit that referenced this pull request Apr 15, 2020
…#54420) (#55208)

* Remove Redundant Cluster State during Snapshot INIT + Master Failover (#54420)

Similar to #54395 we know that a snapshot in INIT state has not
written anything to the repository yet. If we see one from a master
failover, there is no point in moving it to ABORTED before removing it
from the cluster state in a subsequent CS update.
Instead, we can simply remove its job from the CS the first time
we see it on master failover and be done with it.
@original-brownbear original-brownbear restored the further-simplify-master-failover branch August 6, 2020 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants