Skip to main content

validate_auto_scaling_strategy

Function validate_auto_scaling_strategy 

Source
fn validate_auto_scaling_strategy(
    strategy: &AutoScalingStrategy,
    cluster_size: Option<&str>,
    schedule_non_manual: bool,
) -> Result<(), PlanError>
Expand description

Validate an AutoScalingStrategy against the cluster’s effective SIZE and SCHEDULE. Rejects a burst HYDRATION SIZE equal to the cluster SIZE (a no-op burst) and the AUTO SCALING STRATEGY + non-MANUAL SCHEDULE combination.

cluster_size is None only when the effective size is unknown at plan time (an unmanaged→managed ALTER that does not set SIZE, which fails later for the missing size); the size equality check is then skipped.