-
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
kv: write replica tombstone on replica creation instead of removal #64966
Labels
A-kv-replication
Relating to Raft, consensus, and coordination.
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
Comments
nvanbenschoten
added
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
A-kv-replication
Relating to Raft, consensus, and coordination.
labels
May 10, 2021
This should be fixed by the cockroach/pkg/kv/kvserver/store_create_replica.go Lines 198 to 277 in e1c24ed
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-kv-replication
Relating to Raft, consensus, and coordination.
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
In the following TODO, we detail a hazard that can allow for the ID of a replica on a node to regress:
cockroach/pkg/kv/kvserver/replica.go
Lines 1510 to 1537 in 79fe0c7
The solution to this is described in the TODO and also in discussion in #40892. In that PR, @ajwerner suggested that:
@bdarnell and @nvanbenschoten both liked the idea but felt it should be deferred to a later change. The time for that change has come.
The plan here is to write a tombstone (see
setTombstoneKey
) to box out replicas with IDs lower than a given replica when that replica is created, rather than (or in addition to?) when it is destroyed. This ensures that even if the replica is never initialized before a node restarts, a replica with a smaller ID (which is known to be old) cannot be created on the node upon a restart.Fixing this will cause
TestProcessSplitAfterRightHandSideHasBeenRemoved/(4)_initial_replica_RHS_partition,_with_restart
to break, because the split will avoid creating a RHS replica with an ID below the ID in the tombstone.Jira issue: CRDB-7367
The text was updated successfully, but these errors were encountered: