KIP-101 — Alter Replication Protocol to use Leader Epoch rather than High Watermark for Truncation
Accepted Kafka 1.0 BrokerProtocol
KIP-101 replaces the high watermark (HWM) as the truncation reference point for follower log recovery with a per-epoch `OffsetForLeaderEpoch` RPC, so followers truncate to the first offset of the next leader epoch rather than their locally cached HWM. The HWM-based truncation allowed data loss and log divergence in scenarios where a follower became leader before it had received the HWM update (e.g. during rapid double failovers).
Protocol Impact
Produce · Fetch · LeaderAndIsr · OffsetForLeaderEpoch
Details
| Author | Ben Stopford |
| Status | Accepted |
| Kafka Version | 1.0 |
| JIRA | KAFKA-1211 |
| Wiki | View on Apache Wiki |
| Created | 2016-12-09 |
| Last Modified | 2021-04-30 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.