Rindle docs and package mapSkip to main content

CommitFanout

Trait CommitFanout 

Source
pub trait CommitFanout {
    // Required method
    fn tx_begin(&self, tx_id: u64) -> StreamBegin;

    // Provided method
    fn recover_failed_begin(&self) { ... }
}
Expand description

The observer of an apply store’s commits. Implemented by the live replica’s worker pool (fanning captured chunks out to the IVM workers behind the snapshot/commit handshake) and by NoFanout (a headless applier — backup replay, an external stream consumer — with no derivation to feed).

Required Methods§

Source

fn tx_begin(&self, tx_id: u64) -> StreamBegin

Open the fan-out for transaction tx_id (the post-(N-1) → N cursor). A send, not a wait (follow-ups/cluster-barrier-wakeup.md §6.1): the observer pins its pre-commit state concurrently with the caller’s remaining statements, and the caller collects the confirmation at the commit edge (FanoutStream::await_acks — the fence). Ready ⇒ stream chunks and finish; Failed ⇒ the observer was unreachable at send — the caller must NOT commit: it finishes the returned stream with an abort and fails the write (see ApplyTxn::commit_with_info).

Provided Methods§

Source

fn recover_failed_begin(&self)

Repair after a Failed begin at commit time (the live pool reaps + respawns the offending worker so the caller’s retry can succeed). Headless: nothing to repair.

Implementors§