Skip to main content

Crate waratah_registry

Crate waratah_registry 

Source
Expand description

String-registry process: the inverse StrHash → raw dictionary.

This crate serves the StringRegistry service (RegisterStrings, ResolveStrings, FlushMemtables, CompactRange, Health, Describe) and nothing else — it never serves hexastore RPCs, and hexastore partitions never serve these. Compute writes hashed strings here on insert and reads them back only for final output bindings (late materialization).

MVP runs one process holding either N in-process shards of waratah_storage::ShardedRegistry or a RocksDB dictionary at {data-dir}/{repository}/registry. Splitting those shards across several registry processes (murmur3(StrHash) % N at the caller) is a later change to routing, not to this RPC surface.

Structs§

BlobStore
Content-addressed blob store: index-backed or in-memory behind one surface, so RegistryService and callers are unaffected by the variant.
BlobVerifyReport
Result of BlobStore::verify.
RegistryIdentity
Process identity echoed by Describe.
RegistryService
StringRegistry service over an in-memory or RocksDB dictionary.
TuningOverride
Restores one process-wide tuning slot to its default (0) when dropped — including when the test panics, which a trailing reset call cannot cover. Two guards over different slots compose.

Enums§

RegistryError
Failure serving a StringRegistry RPC.

Constants§

DEFAULT_SHARD_COUNT
Number of in-process registry shards when none is configured.
INLINE_THRESHOLD_BYTES
Largest payload stored inline in the blob index.
MAX_BLOB_BYTES
Maximum size of one stored blob (64 MiB).
MAX_REGISTERED_STRING_BYTES
Maximum stored length of one registered string (IRI, literal lexical form, or big language tag), counted in UTF-8 bytes.
RESOLVE_FRAME_BUDGET_BYTES
Byte budget for one streamed ResolveStrings frame (message).
SEGMENT_HANDLE_CACHE
Default number of segment files kept open for reads.
SEGMENT_TARGET_BYTES
A segment rolls to the next file once its length reaches this target after an append.

Functions§

bind
Bind a listener for the registry process (port 0 picks an ephemeral port).
serve
Serve the StringRegistry service on incoming until the future is dropped.
set_segment_handle_cache
Override the segment handle-cache capacity for tests (eviction tests need a tiny cache). Clamped to [SEGMENT_HANDLE_CACHE_MAX]. The capacity is read once at BlobStore::open, so set it before opening. Process-wide; the returned guard restores the default when dropped. The slot treats 0 as “use the default” (the same value the guard stores), so passing 0 yields SEGMENT_HANDLE_CACHE, not an empty cache.
set_segment_target_bytes
Override the segment roll target for tests (rollover tests need a shrinkable segment). Process-wide; the returned guard restores the default when dropped. Serialize against other tuning-sensitive tests (the test module’s mutex) while an override is live. The slot treats 0 as “use the default” (the same value the guard stores), so passing 0 is equivalent to no override.