pub struct ParallelWalLaneStager<T> { /* private fields */ }Expand description
Production lane-local staging state for ordinary parallel WAL appends.
This keeps batch ownership, backlog accounting, and same-lane drain order
inside fsqlite-wal instead of scattering the logic across pager-only
callers. The caller still owns the final ordered durability residue.
Implementations§
Source§impl<T> ParallelWalLaneStager<T>
impl<T> ParallelWalLaneStager<T>
pub fn new(control: ParallelWalControlSurface) -> Self
pub fn control(&self) -> &ParallelWalControlSurface
pub fn next_batch_id(&self) -> u64
pub fn lane_count(&self) -> usize
pub fn current_lane_id(&self) -> u16
pub fn current_lane_backlog(&self, lane_id: u16) -> usize
pub fn record_batch(&self, batch: ParallelWalLaneBatch<T>) -> usize
pub fn take_batches_for_flush( &self, contexts: &[TransactionFrameBatchContext], ) -> Option<HashMap<u64, ParallelWalLaneBatch<T>>>
Sourcepub fn discard_batches_for_flush(
&self,
contexts: &[TransactionFrameBatchContext],
) -> usize
pub fn discard_batches_for_flush( &self, contexts: &[TransactionFrameBatchContext], ) -> usize
Discard prepared payloads for batches that already fell back to the raw ordered WAL path.
Lane-local preparation is an optimization, not the durability record. If a flusher cannot consume the prepared payloads for a group-commit epoch, those payloads become stale as soon as the same batches are appended via borrowed frame refs. Leaving them queued would make later epochs see an old batch id at the front of the lane and permanently fall back.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for ParallelWalLaneStager<T>
impl<T> RefUnwindSafe for ParallelWalLaneStager<T>
impl<T> Send for ParallelWalLaneStager<T>where
T: Send,
impl<T> Sync for ParallelWalLaneStager<T>where
T: Send,
impl<T> Unpin for ParallelWalLaneStager<T>where
T: Unpin,
impl<T> UnsafeUnpin for ParallelWalLaneStager<T>
impl<T> UnwindSafe for ParallelWalLaneStager<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more