Skip to main content

Module cluster_state

Module cluster_state 

Source
Expand description

Plain-data mirror of a managed cluster’s durable configuration.

These types carry the slices of a managed cluster’s config that a caller reasons over without touching the catalog or SQL layers. Keeping them free of catalog and SQL dependencies lets one component reason over the config and another project the live config onto the same types, without either depending on the other.

ExpectedClusterState is a compare-and-append witness. A caller captures it from a config snapshot and pairs it with a conditional write. The applier re-projects the live config and applies the write only if it still equals the witness.

Structs§

AvailabilityZonePool
An unordered set of availability zones: an AvailabilityZones provisioning list reduced to membership. Produced by AvailabilityZones::pool for the one comparison that must ignore order, replica interchangeability.
AvailabilityZones
The availability zones a managed cluster’s replicas are provisioned across, in configured provisioning order.
BurstRecord
An active hydration-burst record, mirrored from durable state.
ExpectedClusterState
Compare-and-append witness over a managed cluster’s durable config: the fields a conditional write is conditioned on. The applier applies the write only if the cluster’s current config still projects to an equal witness.
ReconfigurationRecord
The latest graceful reconfiguration record, mirrored from durable state.
ReconfigurationTarget
The full config shape a reconfiguration is moving the cluster to. Distinct from a replica shape because it additionally carries replication_factor, a cluster-level rather than replica-level dimension.
ReplicaShape
The config dimensions that distinguish one replica from another. Two replicas with equal shape are interchangeable. An AVAILABILITY ZONES difference is a shape difference, but only as an unordered pool: reordering the same zones does not change a replica’s shape (see ReplicaShape::matches).

Enums§

BurstAudit
The lifecycle transition a write to the burst record represents, declared by the writer like ReconfigurationAudit. A burst record is also rewritten in place for bookkeeping (stamping or resetting the linger clock), which is not a lifecycle transition and declares no audit.
BurstFinishCause
Why a hydration burst finished, known only to the strategy arm that decided the teardown.
OnTimeout
The action a graceful reconfiguration applies once its deadline passes with the target replicas not yet hydrated. Success always takes precedence: a hydrated target cuts over regardless of this. A plain-data mirror of mz_sql::plan::OnTimeoutAction, free of a dependency on the SQL layer.
ReconfigurationAudit
The lifecycle transition a write to the reconfiguration record represents, declared by the writer at the decision point and carried alongside the state so the audit event is emitted in the same catalog transaction as the write. A plain-data mirror of the audit-log lifecycle vocabulary, free of a dependency on mz-audit-log.
ReconfigurationStatus
The status of the latest graceful reconfiguration record.