pub fn producer_completion_window(
current: Option<i16>,
epoch: i16,
ends: &[i64],
incoming: i64,
) -> (bool, Vec<usize>)Expand description
Merge a deferred data completion into the current epoch’s retry window.
The returned indices name old batches, or ends.len() for the incoming
batch. Equal physical offsets keep the existing metadata. Earlier
completions cannot displace a newer batch; only the five greatest distinct
offsets survive. A lower epoch preserves the old window and is rejected. The
host supplies sorted retained batches and a truthful incoming batch.