KIP-1358 — Gradual and gated preferred-leader election in the KRaft controller
Discussion KRaftBroker
Gates and throttles preferred-leader election in the KRaft controller, holding leadership back from a broker that still has global catch-up work outstanding and making the per-run election batch configurable instead of the hardcoded 1000. Today the controller returns leadership per partition the instant that partition re-enters the ISR, so a restarted or rebuilt broker takes leadership in one burst while its disk and network are still saturated by replica fetches, spiking produce P99 and prolonging recovery of __consumer_offsets, __transaction_state, and __share_group_state.
Details
| Author | Haifeng Chen |
| Status | Discussion |
| JIRA | KAFKA-20708 |
| Wiki | View on Apache Wiki |
| Created | 2026-06-16 |
| Last Modified | 2026-06-16 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.