-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: remove legacy snapshot and diff code #89813
Conversation
Let's hold off until we know what's up with 22.1 compatibility. I think we can still get rid of the diffs, because 22.1 will degrade gracefully if we omit them from the responses, but let's confirm. |
This commit removes the proto and code for RaftDataSnapshot. This type was used for reporting replica snapshots and computing diffs, but now this functionality has been removed in favor of storage checkpoints and offline tooling. Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good riddance!
As you may know, version-skipping upgrades were pushed back, so we don't need 22.1 compatibility for 23.1. In other words, let's merge this.
pkg/kv/kvserver/helpers_test.go
Outdated
func ChecksumRange( | ||
ctx context.Context, desc roachpb.RangeDescriptor, snap storage.Reader, | ||
) ([]byte, error) { | ||
var r *Replica // TODO(pavelkalinnikov): make this less ugly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sha512()
doesn't use the Replica
receiver for anything, so we can just rename and export the function instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it a stand-alone replicaSHA512
function, but not exported for now. It would require changing signature, or exporting the ad-hoc replicaHash
type together with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll see tomorrow if I can make this even cleaner, and will send a follow-up PR if so.
This function does not use the replica, so does not have to be a method. Epic: None Release note: None
bors r=erikgrinaker |
Build succeeded: |
90313: kvserver: cleanup replica checksum computation func r=erikgrinaker a=pavelkalinnikov This commit makes the replica checksum helper more convenient for tests, and simplifies the tests using it. Follows up on #89813 (comment) Epic: None Release note: None Co-authored-by: Pavel Kalinnikov <[email protected]>
This commit removes the proto and code for
RaftDataSnapshot
. This type was used for reporting replica snapshots and computing diffs, but now this functionality has been removed in favor of storage checkpoints and offline tooling.Part of #21128
Epic: none
Release note: None