pub fn remote_read_relative_offset(
start_offset: i64,
end_offset: i64,
requested_offset: i64,
copy_finished: bool,
epoch_start: Option<i64>,
next_epoch_start: Option<i64>,
) -> Option<u32>Expand description
Admit a remote segment for one requested offset and derive its relative
offset for Kafka’s u32 sparse index.
A segment is usable only after its copy finished, when it contains the
requested offset, and when the offset falls inside the requested leader
epoch’s [epoch_start, next_epoch_start) subrange. The last epoch has no
next boundary and runs through the segment end. A segment wider than the
relative-index representation fails closed rather than truncating or
defaulting the relative offset.