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

kvserver: make consistency check symmetrical #88268

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

pav-kv
Copy link
Collaborator

@pav-kv pav-kv commented Sep 20, 2022

Previously, a consistency check would fail if the local replica failed to compute the checksum. This makes the consistency checks not resilient to issues with the leader.

The only place depending on this assertion is the MVCC stats delta sub-check of the consistency check. It is not strictly required to take delta from the local replica for this purpose, any successful response from other replicas can be used too.

This commit makes it so that any successful checksum computation can be examined. As a result, all replicas are treated symmetrically, so the consistency check is more resilient to leader issues.

Touches #77432
Release note: None

Previously, a consistency check would fail if the local replica failed to
compute the checksum. This makes the consistency checks not resilient to issues
with the leader.

The only place depending on this assertion is the MVCC stats delta sub-check of
the consistency check. It is not strictly required to take delta from the local
replica for this purpose, any successful response from other replicas can be
used too.

This commit makes it so that any successful checksum computation can be
examined. As a result, all replicas are treated symmetrically, so the
consistency check is more resilient to leader issues.

Release note: None
@pav-kv pav-kv requested review from erikgrinaker and tbg September 20, 2022 18:19
@pav-kv pav-kv requested a review from a team as a code owner September 20, 2022 18:19
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

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

Makes sense. Since we're running all checks in parallel, there is no longer any need to pick a privileged replica -- we only care whether there's a minority hash, and the check will fall back to RANGE_INDETERMINATE if any replica errors anyway.

@pav-kv
Copy link
Collaborator Author

pav-kv commented Sep 21, 2022

Ta!

bors r=erikgrinaker

@craig
Copy link
Contributor

craig bot commented Sep 21, 2022

Build succeeded:

@craig craig bot merged commit 7cde315 into cockroachdb:master Sep 21, 2022
@pav-kv pav-kv deleted the symmetric_consistency_check branch October 17, 2022 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants