Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9876 Implement Raft Protocol for Metadata Quorum
  3. KAFKA-10634

LeaderChangeMessage should include the leader as one of the voters

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      When a leader is elect the leader writes a `LeaderChangeMessage` to the replicated log. This message is defined in KIP-595 as:

      {
        "type": "data",
        "name": "LeaderChangeMessage",
        "validVersions": "0",
        "flexibleVersions": "0+",
        "fields": [
            {"name": "LeaderId", "type": "int32", "versions": "0+",
             "about": "The ID of the newly elected leader"},
            {"name": "VotedIds", "type": "[]int32", "versions": "0+",
             "about": "The IDs of the voters who voted for the current leader"},
         ]
      }

      The current implementation doesn't include the LeaderId in the set of VoterIds. In the protocol it is guarantee that the leader must have voted for itself.

      Attachments

        Issue Links

          Activity

            People

              sagarrao Sagar Rao
              jagsancio Jose Armando Garcia Sancio
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: