Expand description
Driver and glue for the mz_cluster_controller reconciler.
The controller crate is pure: it knows nothing about the Coordinator. This
module is the half of the ClusterControllerCtx boundary that does: it runs
the controller as a separate task and implements the ctx by marshaling
each pull/apply to the Coordinator over the internal command channel, because
the catalog and the live compute/storage signals are reachable only from the
coordinator loop. Whole-tick reads are batched. Refresh-window catalog inputs
are pulled one cluster at a time and completed with one shared oracle read.
The remaining per-cluster live signals are pulled on demand, so steady
clusters do not pay for signals they do not use.
The controller owns the replica set of every managed cluster, user and
system alike. A builtin cluster’s config-implied replicas are additionally
materialized by reconcile_builtin_cluster_replicas at catalog open, which
derives the same target from the same config, so the two converge rather
than compete.
Structs§
- Coord
Ctx 🔒 - The controller-task side of the boundary: a
ClusterControllerCtxthat marshals every call to the Coordinator overinternal_cmd_tx. - Replica
Hydration 🔒Check
Enums§
- Cluster
Controller Request - A request the controller task marshals to the Coordinator to satisfy one
ClusterControllerCtxcall. Each variant carries a oneshot for the reply.
Functions§
- audit_
reason_ 🔒for_ create - Map a create decision’s
CreateReasonto the audit reason carried on the create event.BaselineauditsReplicaCreateDropReason::Manual, the tag for replicas the user’s own cluster config calls for. The match is exhaustive, so a newCreateReasonvariant is a compile error here instead of a silentManual. - memory_
burst 🔒 - memory_
reconfiguration 🔒 - on_
timeout_ 🔒from_ controller - replica_
shape 🔒 - Map an in-memory replica config to a
ReplicaShape, orNonefor an unmanaged replica (which the controller does not own). - status_
from_ 🔒controller