pub struct ReadGeneration { /* private fields */ }Expand description
S1C-001: an immutable, atomically-published table read view — the
engine-layer counterpart of database::TableReadGeneration. Readers pin
an Arc<ReadGeneration>; writers publish a replacement with a single
ArcSwap store (Table::publish_read_generation) after sealing their
active deltas, so no write ever clones the complete table/index set
merely because readers exist: every captured piece is either an Arc
share of immutable frozen layers or a small metadata copy.
visible_through is the engine’s commit-epoch watermark (the spec’s
HlcTimestamp maps onto it at the commit-log layer): the view reflects
every commit whose epoch is <= visible_through, and later writes are
invisible through it even though they mutate the publishing Table.
Implementations§
Source§impl ReadGeneration
impl ReadGeneration
Sourcepub fn base_runs(&self) -> &[RunRef]
pub fn base_runs(&self) -> &[RunRef]
Immutable base sorted runs (r-*.sr) visible in this generation.
Sourcepub fn indexes(&self) -> &Arc<IndexGeneration>
pub fn indexes(&self) -> &Arc<IndexGeneration>
The published index generation (all six families).
Sourcepub fn visible_through(&self) -> Epoch
pub fn visible_through(&self) -> Epoch
Highest commit epoch reflected in this view.
Sourcepub fn deltas(&self) -> &TableDeltas
pub fn deltas(&self) -> &TableDeltas
The sealed in-memory deltas captured with this view. The view owns an
Arc share of every frozen layer, so the layers stay alive (and
unchanged) for as long as the view is pinned.
Trait Implementations§
Source§impl Clone for ReadGeneration
impl Clone for ReadGeneration
Source§fn clone(&self) -> ReadGeneration
fn clone(&self) -> ReadGeneration
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 !RefUnwindSafe for ReadGeneration
impl !UnwindSafe for ReadGeneration
impl Freeze for ReadGeneration
impl Send for ReadGeneration
impl Sync for ReadGeneration
impl Unpin for ReadGeneration
impl UnsafeUnpin for ReadGeneration
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> 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