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
Details
| Author | Anna Povzner |
| Status | Accepted |
| Kafka Version | 2.0 |
| JIRA | KAFKA-6361 |
| Wiki | View on Apache Wiki |
| Created | 2018-04-04 |
| Last Modified | 2020-06-10 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.