pub struct LockFreeVersion {
pub storage: ValueStorage,
pub txn_id: u64,
pub commit_ts: AtomicU64,
pub next: AtomicPtr<LockFreeVersion>,
}Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Expand description
Version of a key-value pair for lock-free access
Uses inline storage for small values to eliminate heap allocation and improve cache locality. Most database values (80%+) fit inline.
Fields§
§storage: ValueStorageUnused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
The value with optimized inline storage
txn_id: u64Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Transaction that created this version
commit_ts: AtomicU64Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Commit timestamp (0 = uncommitted)
next: AtomicPtr<LockFreeVersion>Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Next version in chain (older)
Implementations§
Source§impl LockFreeVersion
impl LockFreeVersion
Sourcepub fn new_from_slice(value: Option<&[u8]>, txn_id: u64) -> Self
👎Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn new_from_slice(value: Option<&[u8]>, txn_id: u64) -> Self
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Create a new uncommitted version with value slice (zero-copy for inline)
Sourcepub fn new(value: Option<Vec<u8>>, txn_id: u64) -> Self
👎Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn new(value: Option<Vec<u8>>, txn_id: u64) -> Self
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Create a new uncommitted version (legacy API - accepts owned Vec)
Sourcepub fn get_value(&self) -> Option<&[u8]>
👎Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn get_value(&self) -> Option<&[u8]>
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Get the value as bytes (zero-copy for inline values)
Sourcepub fn value_cloned(&self) -> Option<Vec<u8>>
👎Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn value_cloned(&self) -> Option<Vec<u8>>
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Get the value as owned Vec (for compatibility)
Note: Prefer get_value() to avoid allocation
Sourcepub fn is_committed(&self) -> bool
👎Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn is_committed(&self) -> bool
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Check if committed
Sourcepub fn get_commit_ts(&self) -> u64
👎Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn get_commit_ts(&self) -> u64
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Get commit timestamp
Sourcepub fn set_commit_ts(&self, ts: u64)
👎Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn set_commit_ts(&self, ts: u64)
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Set commit timestamp
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LockFreeVersion
impl RefUnwindSafe for LockFreeVersion
impl Send for LockFreeVersion
impl Sync for LockFreeVersion
impl Unpin for LockFreeVersion
impl UnsafeUnpin for LockFreeVersion
impl UnwindSafe for LockFreeVersion
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