kvserver: partial implementation of ReplicasStorage#91579
Closed
tbg wants to merge 3 commits intocockroachdb:masterfrom
Closed
kvserver: partial implementation of ReplicasStorage#91579tbg wants to merge 3 commits intocockroachdb:masterfrom
tbg wants to merge 3 commits intocockroachdb:masterfrom
Conversation
The significant missing piece is part of the Init implementation to handle a RecoveryInconsistentReplica that requires applying committed raft log entries to the state machine. This missing piece will need to wait until cockroachdb#75729 is fixed. There are multiple TODOs, including related to concurrency, but the implementation is complete enough for the datadriven test to exercise many state transitions. Additionally, the test exercises loss of unsynced state, and fixup of that state in ReplicasStorage.Init, by using vfs.NewStrictMem. Informs cockroachdb#16624 Release note: None
Member
sumeerbhola
reviewed
Nov 10, 2022
Collaborator
sumeerbhola
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @tbg)
pkg/kv/kvserver/replicas_storage.go line 693 at r2 (raw file):
// contain the term. RangeStorage must simply remove all entries > Hi; // additionally it's too late to SingleDelete any existing entries since // that write would now apply to the new entries, not the old ones.
This is used for purging the sideloaded files, which include the term in the key, similar to what happens in
cockroach/pkg/kv/kvserver/replica_raft.go
Lines 999 to 1008 in cf2b7f8
Maybe it would be sufficient for this to be the term of Lo?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP