Skip to content

kvserver: use separate type for uninitialized replicas #72374

@tbg

Description

@tbg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-kv-replicationRelating to Raft, consensus, and coordination.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions