Skip to main content

Crate waratah_partition

Crate waratah_partition 

Source
Expand description

Hexastore partition process for one axis of the three-way hexastore.

This crate serves the Hexastore service (InsertQuads, ScanPattern, ScanPatternStream, CountPattern, DomainScan, AxisHeadScan, FlushMemtables, CompactRange, GetStatsProfile, ListNamedGraphs, AddNamedGraph, Health, Describe). String registration and resolution belong to the separate waratah_registry process. A process opens only the two column families its axis owns, so a request naming another axis or a foreign index is rejected with a typed error rather than silently served. ListNamedGraphs / AddNamedGraph are S-axis only; DomainScan / AxisHeadScan serve only permutations owned by the serving axis; other requests return UNIMPLEMENTED.

Phase 7 observes every insert into a waratah_stats::ShardStats write-path profile. On RocksDB flush/compaction a table-properties collector writes the same sketches into SST user_collected_properties; GetStatsProfile reloads live SST blobs only when that cache is stale. OnFlushBegin copies open aside (flushing) so stats RPCs during the flush stay complete; OnFlushCompleted marks the SST merge stale and the next reload drops flushing, not post-flush open writes. Phase 8 wraps PartitionService::insert_quads with Multi-Raft propose/apply; the RPC surface and the versioned record layout stay as-is.

Structs§

NodeIdentity
Process identity echoed by Describe (listen address, data dir, node id).
PartitionService
Hexastore service over one axis-local storage brick.
RocksDbOpenOptions
RocksDB open knobs for a partition process (stats collector, auto-compaction).

Enums§

PartitionError
Failure serving a Hexastore RPC on a single partition axis.

Constants§

GEO_REBUILD_LEASE
How long a geo rebuild lease is trusted before stale takeover. The lease holder is a live compute streaming terms and posting back; a generous budget survives slow blob fetches on big stores.
SCAN_DISPATCH_ROW_THRESHOLD
Row-estimate ceiling for caller-thread scan execution (WARATAH_SCAN_DISPATCH_ROW_THRESHOLD overrides; 0 disables).
SCAN_STREAM_FRAME_ROWS
Quads packed into one ScanPatternStream gRPC frame.
TEXT_REBUILD_LEASE
How long a text rebuild lease is trusted before stale takeover. Same rationale as GEO_REBUILD_LEASE: the walk is compute-driven, and a driver that dies must not wedge the index permanently.

Functions§

bind
Bind a listener for the partition process.
rebuild_temporal_index_storage
The temporal index rebuild walk over one already-open O store: wipe the index CF, collect the per-quad-live temporal terms (a term stays when ANY referencing quad’s own-latest version is a Put — deletes are never mirrored to postings, so the walk after the wipe is the GC of dead terms), derive postings under config, apply them, replace the histogram with an exact cut, and stamp epoch = max commit_ts over temporal-carrying rows (equal, never +1 — the epoch derives from the indexed data). Shared by the partition’s RPC-executed rebuild, the standalone startup path, and the offline CLI.
scan_dispatch_row_threshold
Resolved once per process: a number overrides the const (A/B batteries), 0 disables the gate (every unary scan dispatches, the pre-gate behavior), junk warns once and keeps the default.
serve
Serve the Hexastore service on incoming until the future is dropped.