Expand description
Retention-prefix selection for the local log and the remote tier.
Kafka deletes retained-away segments oldest first and stops at the first
segment it keeps, so every selection here is a contiguous prefix. The local
walk and the remote walk combine their predicates differently, because
Kafka does: UnifiedLog.deleteOldSegments runs separate passes over the
local log, while RemoteLogManager’s RemoteLogRetentionHandler checks
every predicate per remote segment. Each walk is proved equal to a
reference fold that states the Kafka rule.
Structs§
- Local
Retention Segment - What the local retention walk knows about one local segment.
- Remote
Retention Segment - What the remote retention walk knows about one finished remote segment.
Functions§
- barrier_
cut_ expired - Decide whether one held barrier cut falls outside the retained epoch window.
- local_
retention_ prefix - Count the oldest local segments that Kafka’s local retention passes delete.
- remote_
covered_ through - Find the greatest contiguous inclusive coverage rooted at
local_start. - remote_
retention_ floor_ step - Extend a deletion floor through one completed whole-range delete.
- remote_
retention_ prefix - Count the oldest finished remote segments that Kafka’s remote retention deletes.
- retention_
delete_ target - The exclusive delete-through target after an inclusive last offset.