conduktor.io ↗

KIP-279 — Fix log divergence between leader and follower after fast leader fail over

Accepted Kafka 2.0 Broker

KIP-279 fixes log divergence scenarios not addressed by KIP-101 (clean and unclean leader elections) by adding epoch validation to the `OffsetForLeaderEpoch` response: the leader now returns an error if the requested epoch is larger than its own, forcing the follower to fetch updated leader epoch information before truncating. Without this, rapid double-failover sequences could cause a follower to skip truncation or truncate to the wrong offset, leaving permanently diverged log lineages.

Protocol Impact

OffsetForLeaderEpoch

Details

AuthorAnna Povzner
StatusAccepted
Kafka Version2.0
JIRAKAFKA-6361
WikiView on Apache Wiki
Created2018-04-04
Last Modified2020-06-10
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.