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/28 16:13:00 UTC
[jira] [Updated] (KAFKA-10634) LeaderChangeMessage should include
the leader as one of the voters
[ https://issues.apache.org/jira/browse/KAFKA-10634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jose Armando Garcia Sancio updated KAFKA-10634:
-----------------------------------------------
Description:
When a leader is elect the leader writes a `LeaderChangeMessage` to the replicated log. This message is defined in KIP-595 as:
{code:java}
{
"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"},
]
}{code}
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.
was:
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.
> 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
> Assignee: Sagar Rao
> Priority: Minor
>
> When a leader is elect the leader writes a `LeaderChangeMessage` to the replicated log. This message is defined in KIP-595 as:
> {code:java}
> {
> "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"},
> ]
> }{code}
> 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)