Skip to main content

LocalHexastoreClients

Struct LocalHexastoreClients 

Source
pub struct LocalHexastoreClients {
    partitions: BTreeMap<PartitionAxis, PartitionService>,
}
Expand description

In-process hexastore clients keyed by partition axis.

Fields§

§partitions: BTreeMap<PartitionAxis, PartitionService>

Implementations§

Source§

impl LocalHexastoreClients

Source

fn open( backend: &Backend, trace: bool, warm: &Arc<WarmState>, ) -> Result<Self, DevError>

Source

fn partition(&self, axis: PartitionAxis) -> Result<&PartitionService, Status>

Trait Implementations§

Source§

impl Clone for LocalHexastoreClients

Source§

fn clone(&self) -> LocalHexastoreClients

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LocalHexastoreClients

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HexastoreAdmin for LocalHexastoreClients

Source§

async fn describe( &self, axis: PartitionAxis, ) -> Result<HexastoreDescribe, Status>

Identity and operational metrics for axis.
Source§

impl HexastoreAxisHeadStats for LocalHexastoreClients

Source§

async fn axis_head_max_commit_ts( &self, permutation: IndexPermutation, head_prefixes: &[Vec<u8>], ) -> Result<u64, Status>

Max commit_ts among the versioned keys whose slot-0 head term falls under head_prefixes. Every version counts — liveness is not evaluated — so the result only ever overestimates the true bound, which is safe for the geo upgrade’s stage-1 swap timestamp.
Source§

impl HexastoreCatalog for LocalHexastoreClients

Source§

async fn list_named_graphs( &self, snapshot: SnapshotId, ) -> Result<Vec<EncodedTerm>, Status>

Named-node graph IRIs visible at snapshot.
Source§

async fn add_named_graph( &self, graph: &EncodedTerm, commit_ts: CommitTs, ) -> Result<(), Status>

Insert an empty named graph, or no-op if already Present.
Source§

impl HexastoreCompact for LocalHexastoreClients

Source§

async fn compact_range(&self, axis: PartitionAxis) -> Result<(), Status>

Ask axis to compact both column families (no-op on memory backends).
Source§

impl HexastoreFlush for LocalHexastoreClients

Source§

async fn flush_memtables(&self, axis: PartitionAxis) -> Result<(), Status>

Ask axis to flush its RocksDB MemTables (no-op on memory backends).
Source§

impl HexastoreGeo for LocalHexastoreClients

Source§

async fn rebuild_geo_index(&self) -> Result<(bool, bool, u64), Status>

Begin the geo index rebuild: take the rebuild lease and wipe the geo_index CF. already_in_progress is the complement of started, exactly how the partition’s gRPC handler derives the pair from begin_geo_rebuild’s Option.

The lease needs no extra coordination on this path. begin_geo_rebuild already keeps it as a plain Option<Instant> deadline, and in waratah standalone the only client that can hold it is the compute node in this process — a driver that dies takes the process with it, so the deadline’s expired-stale takeover can only ever fire against a lease this same process abandoned.

Source§

async fn renew_geo_rebuild_lease(&self) -> Result<(), Status>

Refresh the held rebuild lease (the driver calls this per batch so a slow walk is not taken over).

Source§

async fn finish_geo_index_rebuild(&self) -> Result<u64, Status>

Finish the geo index rebuild: stamp epoch = max commit_ts observed on the partition and release the lease. Fails without a fresh lease, same as the gRPC path.

Source§

async fn put_temporal_index( &self, puts: &[TemporalIndexPut], ) -> Result<u64, Status>

Apply temporal-index postings on the O partition.

Without this the trait’s default returns unimplemented, and every temporal write plugin posting is dropped in waratah standalone: the index stays empty AND its epoch stays unstamped, so the comparison rewrite’s trust gate refuses to fire and queries fall back to the unindexed residual. Right answers, no index, nothing logged. The geo twin above is implemented; this is the parity it was missing.

Source§

async fn temporal_candidate_scan( &self, intervals: &[TemporalCellInterval], snapshot: SnapshotId, predicate: TemporalQueryPredicate, limit: u64, ) -> Result<TermPageStream, Status>

Drain one temporal candidate scan (never cursor-paged; the partition owns the DISTINCT seen-set for the drain).

Source§

async fn rebuild_temporal_index( &self, config: DyadicCovererConfig, ) -> Result<(bool, bool), Status>

Trigger the O-axis temporal rebuild, mirroring the partition’s gRPC handler: started says this call ran the walk, already_in_progress is its complement (the in-progress flag is compare-exchanged, so a loser reports Ok(false) rather than blocking).

Source§

async fn put_geo_index(&self, puts: &[GeoIndexPut]) -> Result<u64, Status>

Apply geometry-index postings on the O partition.
Source§

async fn delete_geo_term(&self, term: &[u8]) -> Result<u64, Status>

Delete every posting of one encoded geo term (rebuild support).
Source§

async fn geo_candidate_scan( &self, intervals: &[GeoCellInterval], snapshot: SnapshotId, query_envelope: Option<GeoEnvelope>, limit: u64, ) -> Result<TermPageStream, Status>

Drain the merged cell-interval candidate scan as term pages. query_envelope enables the partition-side AABB reject; limit of 0 is unlimited (and is a per-drain cap, not a cursor).
Source§

async fn put_text_index(&self, docs: &[TextIndexDoc]) -> Result<u64, Status>

Append text-index documents on the O partition (text plugin). Sent BEFORE the three axis InsertQuads calls, so a visible row never lacks its document. The partition commits and reloads its reader before acknowledging.
Source§

async fn text_candidate_scan( &self, request: &TextSearchRequest, snapshot: SnapshotId, ) -> Result<TermPageStream, Status>

Drain one text candidate request as term pages. One RPC drains the whole distinct candidate set; limit of 0 is unlimited (and is a per-drain guard that errors, not a cursor).
Source§

async fn text_subject_scan( &self, request: &TextSubjectRequest, snapshot: SnapshotId, ) -> Result<SubjectRowStream, Status>

Resolve one text search to DISTINCT subjects on the O partition. Read more
Source§

async fn rebuild_text_index( &self, analyzer: &str, seed_chars: u32, fingerprint: &str, wipe: bool, ) -> Result<(bool, bool, u64), Status>

Open-or-create the text index with an explicit config, optionally wipe, and take the rebuild lease. Returns (started, already_in_progress, lease_token) — the token is the caller’s proof of lease ownership (non-zero exactly when started); every renew / finish must carry it. The calling compute drives the walk and finishes with Self::finish_text_index_rebuild.
Source§

async fn renew_text_rebuild_lease(&self, lease_token: u64) -> Result<(), Status>

Refresh the text rebuild lease (driver keepalive per batch). Rejected unless lease_token identifies the current fresh lease.
Source§

async fn finish_text_index_rebuild( &self, lease_token: u64, stamp: bool, ) -> Result<u64, Status>

Finish the text index rebuild: release the lease, and — when stamp — stamp the partition’s max-seen commit_ts as the epoch. stamp = false releases without stamping (the index stays untrusted). Returns the stamped epoch (0 when not stamping). Rejected unless lease_token identifies the current fresh lease.
Source§

impl HexastoreInsert for LocalHexastoreClients

Source§

async fn insert_quads( &self, axis: PartitionAxis, versions: &[QuadVersion], ) -> Result<u64, Status>

Apply versions on axis (asserted in the request for axis isolation).
Source§

async fn replace_quads( &self, pairs: &[ReplacePair], commit_ts: CommitTs, ) -> Result<u64, Status>

Atomically replace object terms on EVERY axis (the migration primitive; see the proto contract). Returns the summed replaced count across S/P/O.
Source§

impl HexastoreScan for LocalHexastoreClients

Source§

async fn scan_pattern_with_comparisons( &self, axis: PartitionAxis, pattern: &EncodedTriplePattern, snapshot: SnapshotId, limit: u64, permutation: Option<IndexPermutation>, filter: Option<&BroadcastFilter>, graph_filter: Option<&GraphFilter>, start_after: Option<&EncodedQuad>, merge_default_graph: bool, iri_only: IriOnlyMask, comparisons: &[SlotComparison], omitted: u8, verdict_wanted: bool, ) -> Result<ScanPage, Status>

In-process mirror of the partition’s ScanPattern handler: the comparisons go straight into scan_filtered_packed’s walk, with no proto round-trip for the comparison list itself. The packed page is still decoded below, so the comparison semantics are the same ones the wire path exercises.

Source§

async fn scan_pattern_stream_with_comparisons( &self, axis: PartitionAxis, pattern: &EncodedTriplePattern, snapshot: SnapshotId, limit: u64, permutation: Option<IndexPermutation>, filter: Option<&BroadcastFilter>, graph_filter: Option<&GraphFilter>, start_after: Option<&EncodedQuad>, merge_default_graph: bool, iri_only: IriOnlyMask, comparisons: &[SlotComparison], omitted: u8, verdict_wanted: bool, ) -> Result<QuadPageStream, Status>

Mirror of the partition’s ScanPatternStream handler: ONE continuous scan_filtered_streaming walk packed into frames on a bounded channel, so the eager path’s compute-side drain logic sees the same streaming shape it gets over real gRPC (the trait default would return one unlimited page).

Both frame branches (caller-thread and dispatched) hand the comparison list to the same walk, so the in-process stream applies exactly the rows the wire stream would.

Source§

async fn scan_domain( &self, permutation: IndexPermutation, constraints: &[EncodedTerm], snapshot: SnapshotId, limit: u64, start_after_constraint: Option<&EncodedTerm>, start_after_term: Option<&EncodedTerm>, graph_name: Option<&EncodedTerm>, graph_filter: Option<&GraphFilter>, iri_only_head: bool, ) -> Result<Vec<DomainScanHit>, Status>

Distinct slot-1 head terms under each slot-0 constraint of permutation.

Source§

async fn scan_domain_counts( &self, permutation: IndexPermutation, constraints: &[EncodedTerm], snapshot: SnapshotId, limit: u64, start_after_constraint: Option<&EncodedTerm>, start_after_term: Option<&EncodedTerm>, graph_name: Option<&EncodedTerm>, graph_filter: Option<&GraphFilter>, iri_only_head: bool, merge_default_graph: bool, mode: DomainCountMode, ) -> Result<Vec<DomainScanCountHit>, Status>

Run lengths of slot-1 head terms under each slot-0 constraint of permutation.

Source§

async fn scan_axis_head( &self, permutation: IndexPermutation, snapshot: SnapshotId, limit: u64, start_after_term: Option<&EncodedTerm>, graph_name: Option<&EncodedTerm>, graph_filter: Option<&GraphFilter>, iri_only_head: bool, head_prefixes: &[Vec<u8>], ) -> Result<Vec<EncodedTerm>, Status>

Distinct slot-0 head terms of the whole permutation CF.

Source§

async fn scan_pattern( &self, axis: PartitionAxis, pattern: &EncodedTriplePattern, snapshot: SnapshotId, limit: u64, permutation: Option<IndexPermutation>, filter: Option<&BroadcastFilter>, graph_filter: Option<&GraphFilter>, start_after: Option<&EncodedQuad>, merge_default_graph: bool, iri_only: IriOnlyMask, omitted: u8, verdict_wanted: bool, ) -> Result<ScanPage, Status>

Encoded rows matching pattern; limit of 0 is unlimited. Read more
Source§

async fn scan_pattern_stream( &self, axis: PartitionAxis, pattern: &EncodedTriplePattern, snapshot: SnapshotId, limit: u64, permutation: Option<IndexPermutation>, filter: Option<&BroadcastFilter>, graph_filter: Option<&GraphFilter>, start_after: Option<&EncodedQuad>, merge_default_graph: bool, iri_only: IriOnlyMask, omitted: u8, verdict_wanted: bool, ) -> Result<QuadPageStream, Status>

Storage-driven drain of pattern as a QuadPageStream. Read more
Source§

async fn count_pattern( &self, axis: PartitionAxis, pattern: &EncodedTriplePattern, snapshot: SnapshotId, limit: u64, permutation: Option<IndexPermutation>, filter: Option<&BroadcastFilter>, graph_filter: Option<&GraphFilter>, merge_default_graph: bool, ) -> Result<u64, Status>

Count matching quads without returning rows; limit of 0 is unlimited. Read more
Source§

async fn count_axis_heads( &self, permutation: IndexPermutation, snapshot: SnapshotId, graph_name: Option<&EncodedTerm>, graph_filter: Option<&GraphFilter>, iri_only_head: bool, ) -> Result<u64, Status>

Axis head count, TOTAL mode: the number of distinct slot-0 head terms of the whole CF for permutation.
Source§

async fn scan_axis_head_counts( &self, permutation: IndexPermutation, snapshot: SnapshotId, limit: u64, start_after_term: Option<&EncodedTerm>, graph_name: Option<&EncodedTerm>, graph_filter: Option<&GraphFilter>, iri_only_head: bool, ) -> Result<Vec<AxisHeadCountHit>, Status>

Axis head count, PER_HEAD mode: per-head distinct slot-1 counts, paged at head boundaries with an exclusive resume cursor.
Source§

fn scan_pattern_detached( &self, axis: PartitionAxis, pattern: &EncodedTriplePattern, snapshot: SnapshotId, limit: u64, permutation: Option<IndexPermutation>, filter: Option<&BroadcastFilter>, graph_filter: Option<&GraphFilter>, start_after: Option<&EncodedQuad>, merge_default_graph: bool, iri_only: IriOnlyMask, omitted: u8, verdict_wanted: bool, ) -> JoinHandle<Result<(Vec<EncodedQuad>, Option<ScanExhaustion>), Status>>

Fetch up to limit rows in a detached task that owns a clone of the client; the returned handle completes with the rows and the walk’s verdict once the task finishes. Read more
Source§

fn scan_pattern_detached_with_comparisons( &self, axis: PartitionAxis, pattern: &EncodedTriplePattern, snapshot: SnapshotId, limit: u64, permutation: Option<IndexPermutation>, filter: Option<&BroadcastFilter>, graph_filter: Option<&GraphFilter>, start_after: Option<&EncodedQuad>, merge_default_graph: bool, iri_only: IriOnlyMask, comparisons: &[SlotComparison], omitted: u8, verdict_wanted: bool, ) -> JoinHandle<Result<(Vec<EncodedQuad>, Option<ScanExhaustion>), Status>>

Self::scan_pattern_detached with slot comparison pushdown. Read more
Source§

impl HexastoreStats for LocalHexastoreClients

Source§

async fn stats_profile(&self, axis: PartitionAxis) -> Result<Vec<u8>, Status>

Serialized CORE waratah_stats::StatsProfile blob from axis (geo/temporal sections empty — each rides its own frame below).
Source§

async fn geo_histogram( &self, axis: PartitionAxis, section: GeoHistogramSection, ) -> Result<Vec<u8>, Status>

ONE geo cell-count histogram frame from axis: self-versioned GeoCellHistogram section bytes carrying exactly the requested map (the unrequested maps empty — subset-populated sections are valid merge inputs on their own).
Source§

async fn temporal_histogram( &self, axis: PartitionAxis, ) -> Result<Vec<u8>, Status>

The temporal tick histogram frame from axis: self-versioned TickHistogram section bytes (bounded by construction, untrimmed).
Source§

async fn text_seed_sketch(&self, axis: PartitionAxis) -> Result<Vec<u8>, Status>

The text seed-population sketch frame from axis: self-versioned TextSeedSketch section bytes, wire-trimmed deepest-first at the partition. Empty bytes = no trusted sketch (never built, wiped, or undecodable) — the caller keeps its unpriced estimate.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

§

fn is_within(&self, b: &G2) -> bool

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Fruit for T
where T: Send + Downcast,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,