pub struct VisibilityDispatcher;Expand description
SIMD-accelerated batch visibility checking for MVCC snapshots.
Checks which rows are visible to a given snapshot timestamp. A row is visible if: commit_ts != 0 && commit_ts < snapshot_ts Or if the row belongs to the current transaction (txn_id match).
Implementations§
Source§impl VisibilityDispatcher
impl VisibilityDispatcher
Sourcepub fn check_batch(
commit_timestamps: &[u64],
snapshot_ts: u64,
visible_mask: &mut [u8],
)
pub fn check_batch( commit_timestamps: &[u64], snapshot_ts: u64, visible_mask: &mut [u8], )
Check visibility for a batch of rows based on commit timestamps.
§Arguments
commit_timestamps- Array of commit timestamps (0 = uncommitted)snapshot_ts- The snapshot timestamp for visibility checkvisible_mask- Output: 1 if visible, 0 if not visible
§Panics
Panics if visible_mask length doesn’t match commit_timestamps length.
Sourcepub fn check_batch_with_txn(
commit_timestamps: &[u64],
txn_ids: &[u64],
snapshot_ts: u64,
current_txn_id: u64,
visible_mask: &mut [u8],
)
pub fn check_batch_with_txn( commit_timestamps: &[u64], txn_ids: &[u64], snapshot_ts: u64, current_txn_id: u64, visible_mask: &mut [u8], )
Check visibility with transaction ID awareness (for self-visibility).
A row is visible if:
- (commit_ts != 0 && commit_ts < snapshot_ts), OR
- txn_id == current_txn_id (self-visibility)
§Arguments
commit_timestamps- Array of commit timestamps (0 = uncommitted)txn_ids- Array of transaction IDs that wrote each rowsnapshot_ts- The snapshot timestamp for visibility checkcurrent_txn_id- The current transaction’s IDvisible_mask- Output: 1 if visible, 0 if not visible
Auto Trait Implementations§
impl Freeze for VisibilityDispatcher
impl RefUnwindSafe for VisibilityDispatcher
impl Send for VisibilityDispatcher
impl Sync for VisibilityDispatcher
impl Unpin for VisibilityDispatcher
impl UnsafeUnpin for VisibilityDispatcher
impl UnwindSafe for VisibilityDispatcher
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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