...
1// Part of KIP-595 to replace Kafka's dependence on Zookeeper with a
2// Kafka-only raft protocol,
3// VoteRequest is used by voters to hold a leader election.
4//
5// Since this is relatively Kafka internal, most fields are left undocumented.
6VoteRequest => key 52, max version 0, flexible v0+, admin
7 ClusterID: nullable-string
8 Topics: [=>]
9 Topic: string
10 Partitions: [=>]
11 Partition: int32
12 // The bumped epoch of the candidate sending the request.
13 CandidateEpoch: int32
14 // The ID of the voter sending the request.
15 CandidateID: int32
16 // The epoch of the last record written to the metadata log.
17 LastOffsetEpoch: int32
18 // The offset of the last record written to the metadata log.
19 LastOffset: int64
20
21VoteResponse =>
22 ErrorCode: int16
23 Topics: [=>]
24 Topic: string
25 Partitions: [=>]
26 Partition: int32
27 ErrorCode: int16
28 // The ID of the current leader, or -1 if the leader is unknown.
29 LeaderID: int32
30 // The latest known leader epoch.
31 LeaderEpoch: int32
32 // Whether the vote was granted.
33 VoteGranted: bool
View as plain text