Skip to main content

share_offset_mutation_decision

Function share_offset_mutation_decision 

Source
pub const fn share_offset_mutation_decision(
    gate: ShareOffsetMutationGate,
    observed_leader_epoch: i32,
    current_leader_epoch: i32,
    state_epoch: i32,
) -> ShareOffsetMutationDecision
Expand description

Admit a requested share-offset mutation and choose its next state epoch.

The caller supplies the data-partition leader epoch captured while it planned the request and a fresh value read immediately before mutation. An exact retry is a no-op. Every other admitted mutation advances the durable share-state epoch by exactly one, or fails closed at i32::MAX.