Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These fields are only meaningful for active replicas(voter) in the quorum. For committed voters, they are not strictly required—the sentinel values simply indicate that the data is unavailable or not applicable.

Case Study: Voter Status Scenarios

When considering voter status, the following scenarios should be addressed:

  1. An existing cluster
    • This is the most common scenario.

    • The cluster already contains a snapshot that includes the voter set record.

    • In this case, voters can be retrieved directly from the KRaftControlStateMachine.

  2. A Single Node Initialized with Dynamic Voters
    • After initialization, the node generates a 0-0.checkpoint file.

    • Similar to the existing cluster case, voters can be obtained directly from the checkpoint through the KRaftControlStateMachine.

  3. A Single Node Initialized with Static Voters
    • This is a special case that requires additional handling.

    • A flag hasHistoryUpdated is introduced to VoterSetHistory, with its initial value set to false.

    • When the votersHistory is updated, this flag is set to true.

    • Retrieval logic:

      • If hasHistoryUpdated is true, the voter set is returned from votersHistory.

      • If hasHistoryUpdated is false, the static voter set is returned.

Compatibility, Deprecation, and Migration Plan

...