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)