pub struct VersionSet { /* private fields */ }Expand description
Manages multiple versions/snapshots of storage state.
Provides lock-free reads by allowing readers to hold references to older snapshots while compaction creates new versions.
Implementations§
Source§impl VersionSet
impl VersionSet
Sourcepub fn acquire(&self) -> SnapshotGuard
pub fn acquire(&self) -> SnapshotGuard
Acquire a snapshot for reading
Returns a guard that keeps the snapshot alive until dropped.
Sourcepub fn install(&self, snapshot: Snapshot)
pub fn install(&self, snapshot: Snapshot)
Install a new snapshot
The old snapshot remains valid for existing readers.
Sourcepub fn create_snapshot(&self, column_groups: Vec<Vec<ColumnGroupRef>>) -> u64
pub fn create_snapshot(&self, column_groups: Vec<Vec<ColumnGroupRef>>) -> u64
Create and install a new snapshot with column groups
Sourcepub fn current_version(&self) -> u64
pub fn current_version(&self) -> u64
Get current version number
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Get number of active snapshots (includes current)
Sourcepub fn stats(&self) -> VersionSetStatsSnapshot
pub fn stats(&self) -> VersionSetStatsSnapshot
Get statistics snapshot
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for VersionSet
impl !RefUnwindSafe for VersionSet
impl Send for VersionSet
impl Sync for VersionSet
impl Unpin for VersionSet
impl UnsafeUnpin for VersionSet
impl UnwindSafe for VersionSet
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
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