Expand description
VnodeRegistry — runtime-configurable virtual node topology.
Replaces the compile-time VNODE_COUNT constant that previously
lived in laminar-storage. A registry owns:
- the runtime-selected vnode count,
- the node-per-vnode assignment (for distributed modes),
- a monotonically increasing
assignment_versionused byObjectStoreBackendto fence out stale writers.
Vnode assignment is derived from the row’s primary key via
key_hash (xxh3) and modulo vnode_count. Connectors that
need a vnode ID for an event call VnodeRegistry::vnode_for_key.
Structs§
- Archived
Node Id - An archived
NodeId - Invalid
KeyGroup Count - A key-group count outside the supported
1..=65535range. - KeyGroup
Count - Validated number of stable key groups in a pipeline.
- Locality
- A node’s failure-domain locality: ordered tier values, coarsest first
(e.g.
["us-east-1", "us-east-1a", "r17"]). Parsed from the node’sfailure_domaingossip string. - NodeId
- Unique identifier for a node. Also the owner id for vnodes; cluster membership and vnode ownership identify the same thing.
- Node
IdResolver - The resolver for an archived
NodeId - Vnode
Assignment Read Guard - Read guard that pins one assignment publication while a source captures a data batch or checkpoint cursor.
- Vnode
Assignment Snapshot - One immutable publication of vnode ownership and the source cursors that belong to the same assignment version.
- Vnode
Registry - Runtime registry of vnode topology and assignment.
Enums§
- Vnode
Lifecycle State - Per-vnode lifecycle state. Distinct from ownership: a vnode this node
owns can still be
Restoringwhile its committed state is being rehydrated from durable storage after a rebalance.
Constants§
- DEFAULT_
CLUSTER_ KEY_ GROUP_ COUNT - Default key-group count for cluster runtimes.
- LOCAL_
KEY_ GROUP_ COUNT - Fixed key-group count for embedded and single-node runtimes.
- MAX_
KEY_ GROUP_ COUNT - Largest key-group count representable by the persisted checkpoint ABI.
- PARTITIONING_
ABI_ VERSION - Durable encoding and hashing contract used to map keys to key groups.
Functions§
- key_
hash - Hash a key to a 64-bit value. Used to derive vnode IDs and for any other keyed-partitioning decisions.
- owned_
vnodes - Vnodes currently assigned to
owner. - owners_
per_ domain - Owner counts per failure domain at
isolation_tier. The largest value overvnode_countis the blast radius — the share of state that goesRestoringif that one domain fails at once. - peer_
owners - Distinct assigned nodes other than
self_id, sorted by id — the peer set a node fans checkpoint barriers and shuffle data out to. - rendezvous_
assignment - Build a vnode-to-owner assignment using Rendezvous Hashing (Highest Random Weight).