Expand description
Byte-exact key constructors for the tenant keyspace.
Constants§
- C_
DEGREE - Counter: adjacency degree of a node in one direction.
- C_
DISTINCT - Counter: distinct dictionary values of
(kind, label, pid). - C_LABEL
- Counter: live records per label.
- C_
LONG_ DISTINCT - Counter: distinct long values of
(kind, label, pid)(non-zeroC_LONG_VALUErows), asC_DISTINCTis for the dictionary. - C_
LONG_ VALUE - Counter: occurrences of one long value of
(kind, label, pid), keyed by its digest (long_value_digest): the value dictionary’s refcount for values too long for it. - C_
LONG_ VALUES - Counter: occurrences of
(kind, label, pid)too long for the dictionary. - C_NULL
- Counter: explicit-null occurrences of a pid.
- C_
REL_ CATALOG - Counter: relationships by
(type, source label, target label). - C_
REL_ SHAPE_ PROP - Counter: relationships of
(type, source label, target label)carrying a pid. - C_
SUPPORT_ BY_ LABEL - Counter: owners carrying a pid, by
(kind, label, pid). - C_
SUPPORT_ BY_ PID - Counter: owners carrying a pid, by
(kind, pid, label). - C_
SUPPORT_ TOTAL - Counter: owners carrying a pid (all labels).
- C_USAGE
- Counter: tenant-wide usage totals, one row per
U_*metric. - DICT_
MAX_ VALUE_ BYTES - Longest encoded
(tag + payload)value that enters the value dictionary (DC10 refinement): longer values are counted inC_LONG_VALUESinstead. - F_
COUNTER - Typed family: derived counters (see the
C_*sub-families). - F_
INDEX_ DEF - Typed family: index id →
crate::index::IndexDef(JSON). - F_
INDEX_ ENTRY - Typed family (derived):
(index id, tag, payload, owner)ordered entry. - F_
INDEX_ NAME - Typed family: index name → index id.
- F_
INDEX_ PENDING - Typed family:
(text index id, owner)→ commit index of the newest change the text applier has not yet indexed (base rows). - F_LABEL
- Typed family:
(label, record ordinal)label membership. - F_
MARKER - Typed family: sticky array markers.
- F_OCC
- Typed family: one canonical occurrence per
(kind, owner, pid, elem). - F_
PRESENCE - Typed family:
(kind, label, pid, nullness, owner)presence. - F_
RECORD_ HDR - Typed family: record ordinal →
(public id, label)header. - F_
RECORD_ ID - Typed family: public record id → record ordinal.
- F_
USAGE_ BYTES - Typed family: the tenant’s logical stored bytes (key + value lengths of every live row under the tenant prefix except this one), maintained by the storage backend in the batch that changes them.
- F_
VALUE_ DICT - Typed family: per-
(kind, label, pid)value dictionary with refcounts. - LONG_
DIGEST_ BYTES - Bytes of a long value’s digest in
long_value_key. - M_
ARRAY_ LABEL - Marker: array-holding owners of a pid under a label (a count).
- NULLNESS_
NULL - Presence nullness: every value the owner has for the pid is null.
- NULLNESS_
VALUE - Presence nullness: the owner has at least one non-null value for the pid.
- P_
DEFINITION - Key segment for property-definition rows.
- P_
EMB_ ALIAS - Key segment for embedding-space alias mappings.
- P_
EMB_ BINDING - Key segment for embedding bindings.
- P_
EMB_ READY - Key segment for per-space ready-vector counts.
- P_
EMB_ RECLAIM - Key segment for pending embedding-slot reclamations.
- P_
EMB_ SPACE - Key segment for embedding-space definitions.
- P_
EMB_ VECTOR - Key segment for stored embedding vectors.
- P_
EMB_ VERSION - Key segment for per-space binding versions.
- P_
FAMILY - Key segment for property-family rows.
- P_
FAMILY_ SIG - Key segment for property-family signatures.
- P_META
- Key segment for tenant metadata rows.
- P_REL
- Key segment for relationship rows by public id.
- P_
REL_ BY_ ORD - Key segment for relationship rows by dense ordinal.
- P_
REL_ GROUP - Per-relationship captured endpoint labels (cascade-safe decrement source).
- SECURITY_
GENERATION_ KEY - Legacy raw global generation key. Retained only for old-command replay and
migration detection; new writes use
security_generation_key(tenant). - SECURITY_
POLICY_ ACTIVE_ KEY - Legacy raw global policy key; new writes use
security_policy_key(tenant). - SYSTEM_
NS - Namespace byte of system rows (not tenant-scoped), storage format v3.
- SYS_
TENANT_ BY_ ORD - System family: tenant ordinal →
(scope digest, state u8). - SYS_
TENANT_ BY_ SCOPE - System family: tenant scope digest →
(ordinal u32 BE, state u8). - SYS_
TENANT_ SEQ - System family: next tenant ordinal to assign (
u32 BE). - TENANT_
NS - Namespace byte of tenant-owned rows, storage format v3.
- TENANT_
PREFIX_ LEN - Length of the tenant key prefix
[TENANT_NS][tenant u32 BE]. - U_
LABELS - Usage metric: labels with at least one live record.
- U_
PROPERTIES - Usage metric: property ids carried by at least one live record.
- U_
RECORDS - Usage metric: live records.
- U_
RELATIONSHIPS - Usage metric: live relationships.
Functions§
- ann_
manifest_ meta_ prefix - Prefix for durable ANN manifests owned by one tenant.
- array_
label_ marker_ key - Marker: owners of
kindunderlabelholdingpidas an array; the value is their count (the row is absent at zero). - array_
label_ marker_ prefix - Prefix of the per-label array markers of one pid.
- counter_
prefix - Prefix of one counter sub-family.
- decode_
counter - Decode a big-endian
u64counter value (absent → 0). - decode_
record_ hdr - Decode a record header value into
(id, label). - degree_
key - Counter: degree of
nodein one direction (true= outgoing). - describe_
key - Human-readable rendering of a storage key for errors and logs: the
tenant, the typed family name, and the remainder in hex (legacy
/-separated keys keep their printable path). - distinct_
key - Counter: distinct dictionary values of
(kind, label, pid). - emb_
alias_ key - Key mapping an embedding-space alias to its space.
- emb_
binding_ key - Key for one embedding binding of an owner property element.
- emb_
bindings_ prefix - Prefix covering every embedding binding in a space.
- emb_
ready_ count_ key - Number of a space’s bindings in
Readystatus, maintained by every commit that writes a binding (big-endianu64). It is the pool a vector search ranks, read in onegetto choose exact or ANN search. - emb_
reclaim_ key - Pending reclamation of a vector slot superseded at commit
after_ci. The slot’s bytes may still be read by a pinned view until the GC watermark passesafter_ci; the reclamation sweep deletes them only then. Ordered byafter_ciso the sweep ranges straight to the reclaimable rows. - emb_
reclaim_ prefix - Prefix covering every pending embedding-slot reclamation for a tenant.
- emb_
reclaim_ value - Value of a reclamation row:
after_ci || space || slot(24 bytes), so the sweep can recover the vector key to delete without re-parsing the key. - emb_
space_ key - Key for an embedding-space definition by space id.
- emb_
space_ version_ key - Version row of a space’s binding set:
prev_ci || ci(16 bytes), the commit that last changed the space’s bindings and the one before it. A cached ANN generation is current when its version equalsci, and an incremental absorb of commitcichains onto it when its version equalsprev_ci— independent of any other space or tenant’s commits. - emb_
space_ version_ value - Encode a space version row.
- emb_
vector_ key - Key for a stored embedding vector slot within a space.
- encode_
record_ hdr - Encode a record header value:
id (16) || label. - family_
label - Coarse family name of any store key, for accounting and diagnostics: tenant families by their family byte, legacy segment keys by their first segment, and system/global keys by namespace. One classifier serves the layout and read-accounting tools.
- index_
def_ key - Key of an index definition.
- index_
def_ prefix - Prefix of every index definition of a tenant.
- index_
entry_ key - Key of one ordered entry:
entryistag ‖ order-preserving payload. - index_
entry_ prefix - Prefix of one index’s entries.
- index_
name_ key - Key mapping an index name to its id.
- index_
pending_ key - Pending row of one owner of an applied index.
- index_
pending_ prefix - Prefix of one index’s pending rows (owners its applier has yet to process: text and structural indexes).
- key
- Build a tenant keyspace key:
[TENANT_NS][tenant u32 BE]followed by/-separated segments. - label_
count_ key - Counter: live records of a label.
- label_
member_ key LABEL: membership row of a record ordinal in a label.- label_
member_ prefix - Prefix of every member of one label.
- label_
members_ prefix - Prefix of every label-membership row of a tenant.
- long_
distinct_ key - Counter: distinct long values of
(kind, label, pid). - long_
value_ digest - Digest of a long dictionary entry (
tag || payload): the firstLONG_DIGEST_BYTESof its SHA-256. - long_
value_ key - Counter: occurrences of the long value with
digestof(kind, label, pid). - long_
value_ prefix - Prefix of the long-value refcounts of
(kind, label, pid); the remainder of a key under it is along_value_digest. - long_
values_ key - Counter: occurrences of
(kind, label, pid)too long for the dictionary. - null_
count_ key - Counter: explicit-null occurrences of
(kind, pid). - occ_key
OCC: the canonical occurrence of one(kind, owner, pid, elem).- occ_
kind_ prefix - Prefix of every occurrence of one owner kind in a tenant.
- occ_
owner_ prefix - Prefix of every occurrence of one owner.
- occ_
pid_ prefix - Prefix of every element of one owner’s pid.
- owner_
prefix - Key prefix for every row owned by records or relationships.
- parse_
emb_ reclaim_ value - Decode a reclamation row value into
(after_ci, space, slot). - parse_
emb_ space_ version - Decode a space version row;
Nonefor a malformed value. - parse_
index_ entry_ key (entry, owner)of an index entry key underprefix(index_entry_prefix).- parse_
label_ member_ key - Parse a membership key into
(label, ordinal). - parse_
occ_ key - Parse an occurrence key into
(tenant, kind, owner, pid, elem). - parse_
presence_ key - Parse a presence key into
(kind, label, pid, nullness, owner). - parse_
record_ hdr_ key - The record ordinal of a
RECORD_HDRkey. - parse_
tenant - The tenant owning a tenant-namespace key, if
keyis one. - prefix_
range - Inclusive start / exclusive end range covering all keys under a prefix.
- presence_
key PRESENCE: an owner carriespid(with the given nullness) under a label.- presence_
nullness_ prefix - Prefix of the presence rows of
(kind, label, pid)with one nullness. - presence_
pid_ prefix - Prefix of every presence row of
(kind, label, pid). - push_
ord - Append
valueas an order-preserving variable-length integer: one length byte (0–8), then the value’s big-endian bytes without leading zeros (0is the lone byte0x00). A shorter encoding is a smaller number, so byte order equals numeric order, and the length byte makes the field self-delimiting, so a key prefix ending in it never matches a longer value (lever C: owner ordinals and property ids are mostly 1–4 bytes). - push_
str - Append a
u16 BE length + bytesstring field. - read_
ord - Read an integer written by
push_ordatpos; returns the value and the position after it. Non-minimal encodings (a leading zero byte, or a length over 8) are rejected so every value has exactly one key. - read_
ord_ tail - Read a
push_ordinteger that must endkeyexactly atpos. - read_
str - Read a
u16 BE length + bytesstring field atpos; returns the string and the position after it. - read_
u64 - Read a big-endian
u64atpos. - record_
hdr_ key RECORD_HDR: ordinal → header.- record_
hdr_ prefix - Prefix of every record header of a tenant.
- record_
id_ key RECORD_ID: public id → ordinal.- record_
id_ prefix - Prefix of every record identity row of a tenant.
- rel_
catalog_ key - Counter: relationships of
(type, source label, target label). - rel_
shape_ prop_ key - Counter: relationships of
(type, source label, target label)that carrypid(creation-time endpoint labels, likerel_catalog_key). - rel_
shape_ prop_ prefix - Prefix of the per-pid counters of one relationship shape.
- security_
generation_ key - Key for a tenant’s security generation watermark.
- security_
policy_ key - Key for a tenant’s active security policy.
- security_
prefix - Prefix covering all security rows of a tenant.
- support_
by_ label_ key - Counter: owners of
kindunderlabelcarryingpid(label-major order). - support_
by_ label_ prefix - Prefix of the per-pid support counters of one label.
- support_
by_ pid_ key - Counter: owners of
kindunderlabelcarryingpid(pid-major order). - support_
by_ pid_ prefix - Prefix of the per-label support counters of one pid.
- support_
total_ key - Counter: owners of
kindcarryingpid. - tenant_
by_ ord_ key - Directory row: ordinal → scope digest.
- tenant_
by_ ord_ prefix - Prefix of every ordinal → scope directory row (tenant enumeration).
- tenant_
by_ scope_ key - Directory row: scope digest → ordinal.
- tenant_
hex - Hex encoding used only for the small set of legacy-style, human-readable
tenant metadata keys. Canonical record, vector, text, and security state
remains under the binary tenant keyspace (
[TENANT_NS][tenant u32]/...). - tenant_
prefix - The 5-byte key prefix owned by
tenant. - tenant_
seq_ key - Directory row holding the next ordinal to assign.
- u64be
- Big-endian 8-byte encoding of an ordinal, used as a key segment.
- usage_
bytes_ key - The tenant’s logical stored bytes row (see
F_USAGE_BYTES). - usage_
count_ key - Counter: one tenant-wide usage metric (
U_*). - value_
dict_ key VALUE_DICT: refcount of one(tag || payload)value of(kind, label, pid).- value_
dict_ prefix - Prefix of the value dictionary of
(kind, label, pid); the remainder of a key under it is the(tag || order-preserving payload)value. - vector_
index_ meta_ prefix - Prefix for durable vector-index definitions owned by one tenant.