pub struct LockFreeVersionChain { /* private fields */ }Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Expand description
Lock-free version chain using fat-node grouping (Rec 2)
Instead of a singly-linked list of individual versions, versions are grouped into fat nodes of 8. This reduces pointer chases from O(v) to O(v/8) since scanning 8 slots within a fat node hits the same cache line.
Implementationsยง
Sourceยงimpl LockFreeVersionChain
impl LockFreeVersionChain
Sourcepub fn new() -> Self
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn new() -> Self
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Create empty version chain
Sourcepub fn add_uncommitted(&self, value: Option<Vec<u8>>, txn_id: u64) -> Result<()>
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn add_uncommitted(&self, value: Option<Vec<u8>>, txn_id: u64) -> Result<()>
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Add a new uncommitted version
Returns error if thereโs already an uncommitted version from another txn
Sourcepub fn commit(&self, txn_id: u64, commit_ts: u64) -> bool
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn commit(&self, txn_id: u64, commit_ts: u64) -> bool
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Commit a version
Sourcepub fn read_at(
&self,
snapshot_ts: u64,
current_txn_id: Option<u64>,
) -> Option<&LockFreeVersion>
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn read_at( &self, snapshot_ts: u64, current_txn_id: Option<u64>, ) -> Option<&LockFreeVersion>
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Read at a snapshot timestamp
Returns the most recent committed version visible at snapshot_ts, or an uncommitted version if it belongs to current_txn_id.
Sourcepub fn has_write_conflict(&self, my_txn_id: u64) -> bool
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn has_write_conflict(&self, my_txn_id: u64) -> bool
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Check if thereโs an uncommitted version by another transaction
Trait Implementationsยง
Auto Trait Implementationsยง
impl !Freeze for LockFreeVersionChain
impl RefUnwindSafe for LockFreeVersionChain
impl Send for LockFreeVersionChain
impl Sync for LockFreeVersionChain
impl Unpin for LockFreeVersionChain
impl UnsafeUnpin for LockFreeVersionChain
impl UnwindSafe for LockFreeVersionChain
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
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>
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