You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jose Armando Garcia Sancio (Jira)" <ji...@apache.org> on 2020/10/22 20:00:01 UTC

[jira] [Created] (KAFKA-10634) LeaderChangeMessage should include the leader as one of the voters

Jose Armando Garcia Sancio created KAFKA-10634:
--------------------------------------------------

             Summary: LeaderChangeMessage should include the leader as one of the voters
                 Key: KAFKA-10634
                 URL: https://issues.apache.org/jira/browse/KAFKA-10634
             Project: Kafka
          Issue Type: Sub-task
            Reporter: Jose Armando Garcia Sancio


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)