Skip to main content

restore_batch_step

Function restore_batch_step 

Source
pub fn restore_batch_step(
    minimum_base: i64,
    base: i64,
    last_delta: i32,
) -> Option<i64>
Expand description

Validate one archived batch and return its exclusive next offset.

The caller supplies the minimum base offset the next batch may carry. Kafka compaction preserves absolute offsets and may leave gaps, so a later base is valid; overlap/regression, a negative span, and an exclusive end outside i64 fail closed.