pub struct PoolTxn { /* private fields */ }Expand description
An in-flight transaction across the pool: every live worker holds a pinned pre-commit
snapshot, awaiting pushed chunks and the terminal gate. Dropping it without
finish releases the workers’ snapshots as an abort.
Implementations§
Source§impl PoolTxn
impl PoolTxn
Sourcepub fn push(&mut self, changes: &[Captured])
pub fn push(&mut self, changes: &[Captured])
Fan captured changes to every worker in bounded chunks (each one shared Arc —
a refcount bump per worker, never a row copy). Each worker derives the chunk
against its held snapshot and speculatively emits the deltas, tagged this
transaction; the consumer holds them until the worker’s Progressed marker. A
worker saturated past its in-flight credit for too long is dropped from the
stream (the liveness sweep owns it from there — its queries fault).
Sourcepub fn finish(self) -> PoolGate
pub fn finish(self) -> PoolGate
Close the push stream and take the commit gate — the unsent terminal command.
Each worker keeps its snapshot until it receives TxFinish with the verdict.
Bounded delivery can still block a worker. Release (or drop) the gate
before the next begin — a begin that overtakes an
unreleased gate makes the affected workers tear down + rehydrate.