-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvserver: don't send replica state explicitly in snapshot #72222
Description
Describe the problem
We just had a mixed-version issue whose root cause was that a snapshot contains a serialized copy of replica.mu.state which can go out-of-sync with the on-disk information when proto fields are phased out.
To Reproduce
Expected behavior
When applying a snapshot, we should not use the protobuf copy of the state. To look everything up from disk, all we need is the start key of the range, which should be the only metadata added to the snapshot. The stateloader should be adapted so that its Load method takes an RKey only.
We need to keep sending the entire state in the snapshot due to cross-version concerns, but one release down the line, we can remove that copy as well.
Additional data / screenshots
Environment:
22.1 master
Additional context