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. Pulls are batched so the round-trip count per tick is
bounded.
Everything here is gated by ENABLE_CLUSTER_CONTROLLER (default off). With
the gate off the task does not tick, so the legacy scheduling and graceful
paths remain the sole writers of the replica set. With the gate on the
controller owns the user managed-cluster replica set; the legacy entry
points no-op. (System/builtin clusters are never controller-owned. The
catalogโs bootstrap migration owns their replicas.)
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ยง
- memory_
burst ๐ - memory_
reconfiguration ๐ - on_
timeout_ ๐from_ controller - reason_
from_ ๐strategies - Map a create decisionโs strategy-attribution to the audit reason carried on the create event.
- replica_
shape ๐ - Map an in-memory replica config to a
ReplicaShape, orNonefor an unmanaged replica (which the controller does not own). - status_
from_ ๐controller