Skip to main content

Module leader_epoch

Module leader_epoch 

Source
Expand description

KIP-101/320 leader-epoch divergence lookup kernel: Kafka’s LeaderEpochFileCache.endOffsetFor.

The log crate keeps the checkpoint entries in strictly increasing epoch and start-offset order. This kernel answers the (found_epoch, end_offset) pair that an OffsetForLeaderEpoch row carries and that a Fetch row’s diverging_epoch is built from.

Structs§

EpochEntry
One leader epoch and the offset where it begins.

Functions§

epoch_and_offset_for_entries
Resolve a requested leader epoch to (found_epoch, end_offset), exactly as Kafka’s LeaderEpochFileCache.endOffsetFor does (see kafka_end_offset_for for the case table).