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

Add Consistency Assertion to SnapshotsInProgress #47598

Conversation

original-brownbear
Copy link
Member

@original-brownbear original-brownbear commented Oct 4, 2019

Assert given input shards and indices are consistent.
Also, fixed the equality check for SnapshotsInProgress.
Before this change the tests never had more than a single waiting
shard per index so they never failed as a result of the
waiting shards list not being ordered.
Fixed by not including the waiting field in the equals and hash methods as it is calculated quasi-deterministically (except for ordering) from shards anyway.

Follow up to #47552

Assert given input shards and indices are consistent.
Also, fixed the equality check for SnapshotsInProgress.
Before this change the tests never had more than a single waiting
shard per index so they never failed as a result of the
waiting shards list not being ordered.

Follow up to elastic#47552
@elasticmachine
Copy link
Collaborator

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

@original-brownbear original-brownbear changed the title Add Consistency Assertion to SnapshtosInProgress Add Consistency Assertion to SnapshotsInProgress Oct 5, 2019
Copy link
Contributor

@ywelsch ywelsch 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
Member Author

Thanks Yannick!

@original-brownbear original-brownbear merged commit 4f41853 into elastic:master Oct 7, 2019
@original-brownbear original-brownbear deleted the assert-reasonable-snapshots-in-progress-entry branch October 7, 2019 06:38
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 7, 2019
Assert given input shards and indices are consistent.
Also, fixed the equality check for SnapshotsInProgress.
Before this change the tests never had more than a single waiting
shard per index so they never failed as a result of the
waiting shards list not being ordered.

Follow up to elastic#47552
original-brownbear added a commit that referenced this pull request Oct 7, 2019
Assert given input shards and indices are consistent.
Also, fixed the equality check for SnapshotsInProgress.
Before this change the tests never had more than a single waiting
shard per index so they never failed as a result of the
waiting shards list not being ordered.

Follow up to #47552
mkleen added a commit to crate/crate that referenced this pull request Nov 27, 2019
This pull request is a backport of elastic/elasticsearch#47552
combined with the related follow up backport of
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failures when multiple data-nodes are lost during the snapshot
process or shard snapshot failures have occured before a node left the
cluster.
mkleen added a commit to crate/crate that referenced this pull request Nov 27, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.
mkleen added a commit to crate/crate that referenced this pull request Nov 27, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.
mkleen added a commit to crate/crate that referenced this pull request Nov 27, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.
mkleen added a commit to crate/crate that referenced this pull request Nov 27, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.
mkleen added a commit to crate/crate that referenced this pull request Nov 28, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.
mkleen added a commit to crate/crate that referenced this pull request Dec 2, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.
mergify bot pushed a commit to crate/crate that referenced this pull request Dec 2, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.
mergify bot pushed a commit to crate/crate that referenced this pull request Dec 2, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.

(cherry picked from commit ed3aea5)
mkleen added a commit to crate/crate that referenced this pull request Dec 5, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.

(cherry picked from commit ed3aea5)
mergify bot pushed a commit to crate/crate that referenced this pull request Dec 5, 2019
This pull request is a backport of two closely related pull requests:
elastic/elasticsearch#47552
elastic/elasticsearch#47598

The purpose of this pull request is to track shard snapshots and mark
them as failed when either multiple data-nodes are lost during the snapshot
process or shard snapshot failures occure before a node left the
cluster. Before this was not the case, so a failed shard would not have been
marked as failed during the snapshot finalization.

The problem is fixed by correctly keeping track of all previous completed
shard states as well in this case and add a consistency assertion to
SnapshotsInProgress. More details can be found in the original prs
mentioned above.

(cherry picked from commit ed3aea5)
@original-brownbear original-brownbear restored the assert-reasonable-snapshots-in-progress-entry branch August 6, 2020 18:24
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