kvprober: probe correct keys in crdb_internal.probe_ranges#101554
kvprober: probe correct keys in crdb_internal.probe_ranges#101554craig[bot] merged 1 commit intocockroachdb:masterfrom
crdb_internal.probe_ranges#101554Conversation
Fixes cockroachdb#101549. In cockroachdb#101549, we found that `crdb_internal.probe_ranges` was unintentionally probing at global range start keys, instead of local probe keys derived from these range start keys. This could lead to serious corruption across the cluster which manifests itself in different ways, depending on the range. This commit fixes `crdb_internal.probe_ranges`, ensuring that it probes at the correct local probe keys. The fix also ensures that we don't make this kind of mistake again. It unifies key encoding code paths for the multiple uses of kvprober to avoid bugs. It also adds validation directly above kvprober's access to the KV client which ensures that probe keys are valid. Release note: None
08bac66 to
b37bdae
Compare
nicktrav
left a comment
There was a problem hiding this comment.
LGTM!
Thanks for the additional test case too.
|
TFTRs! bors r=erikgrinaker,nicktrav |
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from b37bdae to blathers/backport-release-22.1-101554: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.1.x failed. See errors above. error creating merge commit from b37bdae to blathers/backport-release-22.2-101554: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.2.x failed. See errors above. error setting reviewers, but backport branch blathers/backport-release-23.1-101554 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/101662/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. [] Backport to branch 23.1.x failed. See errors above. error setting reviewers, but backport branch blathers/backport-release-23.1.0-101554 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/101663/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. [] Backport to branch 23.1.0 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Fixes #101549.
In #101549, we found that
crdb_internal.probe_rangeswas unintentionally probing at global range start keys, instead of local probe keys derived from these range start keys. This could lead to serious corruption across the cluster which manifests itself in different ways, depending on the range. This commit fixescrdb_internal.probe_ranges, ensuring that it probes at the correct local probe keys.The fix also ensures that we don't make this kind of mistake again. It unifies key encoding code paths for the multiple uses of kvprober to avoid bugs. It also adds validation directly above kvprober's access to the KV client which ensures that probe keys are valid.
Release note: None