Expand description
Conversions between the AUTO SCALING STRATEGY cluster option and the
structured AutoScalingStrategy policy.
Three representations meet here:
- The SQL option in a
CREATE CLUSTER/ALTER CLUSTERstatement (ClusterAutoScalingStrategyOptionValueAST). - The structured policy (
mz_sql::plan::AutoScalingStrategy), used for drift comparison. - The
strategyjsonb column ofmz_internal.mz_cluster_auto_scaling_strategies, whose serde shape matches the plan type.
Functionsยง
- strategy_
from_ ๐catalog_ json - Parse the
strategyjsonb column ofmz_internal.mz_cluster_auto_scaling_strategies(fetched as text). The column is JSONnullfor a cluster whose policy was just removed while a burst still lingers, which maps toNonelike a missing row. - strategy_
from_ ๐option_ value - Convert the AST option value into a structured policy. An empty block
AUTO SCALING STRATEGY = ()maps toNone(autoscaling disabled), the same normalization the server planner applies. - strategy_
to_ ๐cluster_ option - Render a structured policy back into a
CREATE CLUSTER/ALTER CLUSTER ... SEToption, e.g.AUTO SCALING STRATEGY = (ON HYDRATION (HYDRATION SIZE = '3200cc', LINGER DURATION = '00:10:00')).