KIP-232 — Detect outdated metadata using leaderEpoch and partitionEpoch
Discussion ClientProtocol
Proposes embedding `leaderEpoch` and `partitionEpoch` into `MetadataResponse` and using them client-side to discard stale metadata fetched from a broker that has not yet processed the latest `UpdateMetadataRequest`. Concurrent `UpdateMetadataRequest` delivery to brokers creates a window where clients fetch old leader epoch data, causing `OffsetOutOfRangeException` in consumers and MirrorMaker position rewinds with no actual log truncation.
Protocol Impact
Fetch · Metadata · LeaderAndIsr · UpdateMetadata · OffsetCommit · OffsetFetch
Details
| Author | Dong Lin |
| Status | Discussion |
| JIRA | KAFKA-6262 |
| Wiki | View on Apache Wiki |
| Created | 2017-12-02 |
| Last Modified | 2018-07-23 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.