-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvserver: use separate type for uninitialized replicas #72374
Copy link
Copy link
Open
Labels
A-kv-replicationRelating to Raft, consensus, and coordination.Relating to Raft, consensus, and coordination.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV TeamKV Team
Description
Is your feature request related to a problem? Please describe.
Replicas can be uninitialized, meaning that they are essentially a pure Raft group waiting to receive a snapshot. We currently represent uninitialized replicas as Replicas. This litters the code with extra checks and is a major driver of complexity along with making the lower replication layers fairly impermeable. If we can make uninitialized into a separate type and clarify when and using which code transitions between the states are made, much will be gained.
Jira issue: CRDB-11122
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-replicationRelating to Raft, consensus, and coordination.Relating to Raft, consensus, and coordination.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV TeamKV Team