What is Vote?
A candidate KRaft controller sends this to other quorum voters to request a vote during leader election. High Vote request rates in controller logs indicate quorum instability, possibly from network partitions or GC pauses causing missed heartbeats.
| Version | Kafka | Changes |
|---|---|---|
| VoteRequest | ||
| v0 | 2.7 | + ClusterId string+ Topics []TopicData+ TopicName string+ Partitions []PartitionData+ PartitionIndex int32+ ReplicaEpoch int32+ ReplicaId int32+ LastOffsetEpoch int32+ LastOffset int64~ Flexible encoding enabled FLEXIBLE |
| v1 | 3.9 | + VoterId int32+ ReplicaDirectoryId uuid+ VoterDirectoryId uuidadds voter key and directory id (KIP-853) |
| v2 | 4.0 | + PreVote booladds PreVote field and renames candidate to replica |
| VoteResponse | ||
| v0 | 2.7 | + ErrorCode int16+ Topics []TopicData+ TopicName string+ Partitions []PartitionData+ PartitionIndex int32+ ErrorCode int16+ LeaderId int32+ LeaderEpoch int32+ VoteGranted bool~ Flexible encoding enabled FLEXIBLE |
| v1 | 3.9 | + NodeEndpoints []NodeEndpoint+ NodeId int32+ Host string+ Port uint16adds leader endpoint (KIP-853) |
| v2 | 4.0 | handles PreVote requests |