pub struct TransactionFrameBatch {
pub frames: Vec<FrameSubmission>,
pub conflict_pages: Vec<u32>,
pub conflict_snapshot: Option<TransactionConflictSnapshot>,
pub context: TransactionFrameBatchContext,
}Expand description
A batch of frames from a single transaction, submitted atomically.
Fields§
§frames: Vec<FrameSubmission>Frames belonging to this transaction, in write order.
conflict_pages: Vec<u32>Pages that must obey first-committer-wins against committed WAL frames newer than this transaction’s read snapshot.
The process-local MVCC registry catches conflicts between connections in the same process. These fields carry the same commit intent through the process-global WAL group-commit queue so the eventual flusher can also reject stale cross-process commits under the WAL append gate.
conflict_snapshot: Option<TransactionConflictSnapshot>WAL visibility snapshot pinned when the submitting transaction began.
If another process has committed any of conflict_pages after this
horizon, the batch must fail with BUSY_SNAPSHOT instead of appending a
stale page image that could hide the other writer’s committed rows.
context: TransactionFrameBatchContextLane-local staging context captured before group-commit submission.
Implementations§
Source§impl TransactionFrameBatch
impl TransactionFrameBatch
Sourcepub fn new(frames: Vec<FrameSubmission>) -> Self
pub fn new(frames: Vec<FrameSubmission>) -> Self
Create a new batch with the given frames.
Sourcepub fn with_conflict_snapshot(
self,
conflict_pages: Vec<u32>,
conflict_snapshot: Option<TransactionConflictSnapshot>,
) -> Self
pub fn with_conflict_snapshot( self, conflict_pages: Vec<u32>, conflict_snapshot: Option<TransactionConflictSnapshot>, ) -> Self
Attach cross-process conflict metadata for the submitting transaction.
Sourcepub fn with_context(self, context: TransactionFrameBatchContext) -> Self
pub fn with_context(self, context: TransactionFrameBatchContext) -> Self
Attach lane-local staging context to this batch.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Number of frames in this batch.
Sourcepub fn has_commit_frame(&self) -> bool
pub fn has_commit_frame(&self) -> bool
Whether this batch contains a commit frame (last frame has db_size > 0).
Trait Implementations§
Source§impl Clone for TransactionFrameBatch
impl Clone for TransactionFrameBatch
Source§fn clone(&self) -> TransactionFrameBatch
fn clone(&self) -> TransactionFrameBatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TransactionFrameBatch
impl RefUnwindSafe for TransactionFrameBatch
impl Send for TransactionFrameBatch
impl Sync for TransactionFrameBatch
impl Unpin for TransactionFrameBatch
impl UnsafeUnpin for TransactionFrameBatch
impl UnwindSafe for TransactionFrameBatch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
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>
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>
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