Skip to main content

Module retention

Module retention 

Source
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§

LocalRetentionSegment
What the local retention walk knows about one local segment.
RemoteRetentionSegment
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.