pub struct ReadSnapshot {
pub store: NodeStore,
pub catalog: Catalog,
pub csrs: HashMap<u32, CsrForward>,
pub db_root: PathBuf,
pub label_row_counts: HashMap<LabelId, usize>,
pub rel_degree_stats: HashMap<u32, DegreeStats>,
}Expand description
Immutable snapshot of storage state required to execute a read query.
Groups the fields that are needed for read-only access to the graph so they
can eventually be cloned/shared across parallel executor threads without
bundling the mutable per-query state that lives in Engine.
Fields§
§store: NodeStore§catalog: Catalog§csrs: HashMap<u32, CsrForward>Per-relationship-type CSR forward files, keyed by RelTableId (u32).
db_root: PathBuf§label_row_counts: HashMap<LabelId, usize>Cached live node count per label, updated on every node creation.
Used by the planner to estimate cardinality without re-scanning the node store’s high-water-mark file on every query.
rel_degree_stats: HashMap<u32, DegreeStats>Per-relationship-type out-degree statistics (SPA-273).
Keyed by RelTableId (u32). Built eagerly at engine open time from
CSR forward files. Used by future join-order heuristics to estimate
how many neighbor hops a traversal on a given relationship type will
produce.
Auto Trait Implementations§
impl Freeze for ReadSnapshot
impl RefUnwindSafe for ReadSnapshot
impl Send for ReadSnapshot
impl Sync for ReadSnapshot
impl Unpin for ReadSnapshot
impl UnsafeUnpin for ReadSnapshot
impl UnwindSafe for ReadSnapshot
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> 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