Expand description
The cluster geo index upgrade/rebuild driver (the RPC shell of
waratah_geo::rebuild’s core): takes the partition lease, streams geo
terms via prefix-filtered head scans, upgrades orphaned typed literals
(ReplaceQuads across all three axes at a swap ts derived from the
walked data — 1 + the max ts under the discovery prefixes), covers the
now-homogeneously-native store, and finishes — refreshing the lease per
batch so a slow walk is never taken over. Startup blocks on this; a
failure leaves the epoch unstamped (the untrusted gate keeps queries
correct via the residual path), and a crashed driver’s stale lease is
force-takeable by the next attempt.
Constants§
- HEAD_
PAGE 🔒 - Head-scan page size (terms per RPC; the walk resumes per term).
- REPLACE_
CHUNK 🔒 - Replace pairs per
ReplaceQuadscall (the client byte-frames anyway; this keeps one call’s pair count bounded for log readability). - TRIPLE_
CHUNK 🔒 - Orphan triples fetched per filtered-scan drain.
- TYPE_
BIG_ 🔒TYPED_ LITERAL - TYPE_
LITERAL_ 🔒GEOMETRY - TYPE_
LITERAL_ 🔒POINT - TYPE_
SMALL_ 🔒TYPED_ LITERAL
Functions§
- drive_
geo_ upgrade - Drive one geo index rebuild/upgrade against a running cluster.
- fetch_
blobs 🔒 - Fetch blob payloads through the registry client (batched), returning
(id, payload)pairs for the hits. - flush_
replaces 🔒 - Flush replace pairs in bounded batches at the upgrade ts.
- geo_
head_ prefixes - The six discovery prefixes: native geo term type bytes plus the orphaned
typed-literal forms (type byte + the geo datatype-IRI hash, which sits at
a fixed offset in both typed-literal encodings). The typed-literal type
bytes are NEVER listed bare: the scan’s prefix normalization
(
prepare_head_prefixes) drops a longer prefix subsumed by a kept shorter one, so a bare[24]/[25]would swallow the four datatype-named prefixes below and widen the head walk to every typed literal in the store. - plan_
orphan 🔒 - Plan one orphan’s upgrade: resolve its lexical (inline for
SmallTypedLiteral, the string registry forBigTypedLiteral), then parse/validate/transform through the shared ingest path. Any failure is a hard rebuild error: stamping an epoch after skipping the orphan would make the trusted candidate index incomplete. - status_
to_ 🔒compute