Skip to main content

diff_cluster_options

Function diff_cluster_options 

Source
fn diff_cluster_options(
    def: &ClusterDefinition,
    existing: &Cluster,
    supports_auto_scaling: bool,
) -> Result<(Vec<ClusterOption<Raw>>, Vec<ClusterOptionName>), String>
Expand description

The managed cluster options mz-deploy reconciles: SIZE, REPLICATION FACTOR, and AUTO SCALING STRATEGY. Compares the definition against the live cluster and returns the options to SET and the option names to RESET so the caller can converge live state onto the file.

A changed option whose value the file declares is SET to that value. A changed option the file omits is RESET only when the option resets on absence. AUTO SCALING STRATEGY is reconciled only when supports_auto_scaling is set, since on older regions the live policy is unknowable.