Skip to main content

producer_snapshot_stray

Function producer_snapshot_stray 

Source
pub fn producer_snapshot_stray(
    snapshots: &[i64],
    index: usize,
    segment_bases: &[i64],
) -> bool
Expand description

Delete the snapshot at snapshots[index] exactly when Kafka’s removeStraySnapshots deletes it, given every local segment’s base offset. The snapshot offsets must be distinct; their order is irrelevant.

The proof assumes index < snapshots.len(). Other inputs are outside that contract, and an index outside snapshots answers false.