Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions doc/user/content/sql/alter-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ by default), Materialize rolls back the resize and the cluster keeps its current
size. To customize the timeout behavior, use the `WAIT UNTIL READY` or `WAIT FOR` options.
The resize still proceeds in the background.

{{< private-preview >}}
Customizing the resize timeout with `WAIT UNTIL READY` or `WAIT FOR`
{{< /private-preview >}}

- `WAIT UNTIL READY (TIMEOUT = ..., ON TIMEOUT = ...)` sets the timeout for the
resize. On timeout, `ON TIMEOUT` selects whether to `COMMIT` (retire the old
replicas and proceed with the not-yet-hydrated new ones, which can cause
Expand Down Expand Up @@ -227,7 +223,6 @@ current size. Materialize drops the pending replicas and keeps the current
configuration.

#### Downtime considerations for v26.34 or before
{{< private-preview />}}

You can use the `WAIT UNTIL READY` option to perform a zero-downtime resizing,
which incurs **no downtime**. Instead of restarting the cluster, this approach
Expand Down
4 changes: 2 additions & 2 deletions doc/user/data/examples/alter_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
The following `<with_option>`s are supported:
| Option | Description |
|--------|-------------|
| `WAIT UNTIL READY(...)` | ***Private preview.** This option has known performance or stability issues and is under active development.* {{< include-from-yaml data="examples/alter_cluster" name="wait-until-ready-cmd-option" >}} |
| `WAIT FOR` | ***Private preview.** This option has known performance or stability issues and is under active development.* Equivalent to `WAIT UNTIL READY` with `ON TIMEOUT = 'ROLLBACK'`. Materialize cuts over once the new replicas hydrate. When Materialize processes an expired timeout, it rolls back the resize and keeps the current size if the target replicas are still unhydrated.|
| `WAIT UNTIL READY(...)` | {{< include-from-yaml data="examples/alter_cluster" name="wait-until-ready-cmd-option" >}} |
| `WAIT FOR` | Equivalent to `WAIT UNTIL READY` with `ON TIMEOUT = 'ROLLBACK'`. Materialize cuts over once the new replicas hydrate. When Materialize processes an expired timeout, it rolls back the resize and keeps the current size if the target replicas are still unhydrated.|

- name: "syntax-reset-to-default"
code: |
Expand Down
3 changes: 0 additions & 3 deletions misc/python/materialize/checks/all_checks/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ def _can_run(self, e: Executor) -> bool:

def initialize(self) -> Testdrive:
return Testdrive(dedent("""
$ postgres-execute connection=postgres://mz_system@${testdrive.materialize-internal-sql-addr}
ALTER SYSTEM SET enable_zero_downtime_cluster_reconfiguration = true

$ postgres-execute connection=postgres://postgres:postgres@postgres
CREATE USER graceful_reconfig WITH SUPERUSER PASSWORD 'postgres';
ALTER USER graceful_reconfig WITH replication;
Expand Down
8 changes: 8 additions & 0 deletions misc/python/materialize/mzcompose/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ def get_minimal_system_parameters(
"true" if version >= MzVersion.parse_mz("v26.29.0-dev") else "false"
)

# The `WITH (WAIT ...)` graceful-reconfiguration surface. Always accepted
# from v26.41 on. Older binaries still gate it behind this feature flag, so
# pin it on for them: the tests that use the surface no longer enable it
# themselves, and in a mixed-version run some of their phases execute
# against the old binary.
if version < MzVersion.parse_mz("v26.41.0-dev"):
config["enable_zero_downtime_cluster_reconfiguration"] = "true"

return config


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ def run(
system_exe.execute("ALTER SYSTEM SET max_sql_server_connections = 1000000")
system_exe.execute("ALTER SYSTEM SET max_kafka_connections = 1000000")
system_exe.execute("ALTER SYSTEM SET idle_in_transaction_session_timeout = 0")
# Gates the WITH (WAIT ...) clause used by ReconfigureClusterAction.
system_exe.execute(
"ALTER SYSTEM SET enable_zero_downtime_cluster_reconfiguration = true"
)
# Most queries should not fail because of privileges
for object_type in [
"TABLES",
Expand Down
9 changes: 0 additions & 9 deletions src/sql/src/plan/statement/ddl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6736,15 +6736,6 @@ pub fn plan_alter_cluster(
);
}

match alter_strategy {
AlterClusterPlanStrategy::None => {}
_ => {
scx.require_feature_flag(
&crate::session::vars::ENABLE_ZERO_DOWNTIME_CLUSTER_RECONFIGURATION,
)?;
}
}

if replica_defs.is_some() {
sql_bail!("REPLICAS not supported for managed clusters");
}
Expand Down
6 changes: 0 additions & 6 deletions src/sql/src/session/vars/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2253,12 +2253,6 @@ feature_flags!(
default: false,
enable_for_item_parsing: false,
},
{
name: enable_zero_downtime_cluster_reconfiguration,
desc: "Enable zero-downtime reconfiguration for alter cluster",
default: false,
enable_for_item_parsing: false,
},
{
name: enable_network_policies,
desc: "ENABLE NETWORK POLICIES",
Expand Down
1 change: 0 additions & 1 deletion test/cloudtest/test_managed_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ def test_zero_downtime_reconfiguration(mz: MaterializeApplication) -> None:
# within the short poll loops below.
mz.environmentd.sql(
"""
ALTER SYSTEM SET enable_zero_downtime_cluster_reconfiguration = true;
ALTER SYSTEM SET cluster_controller_tick_interval = '5ms';
""",
port="internal",
Expand Down
14 changes: 2 additions & 12 deletions test/cluster/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -6318,7 +6318,6 @@ def workflow_test_zero_downtime_reconfigure(
key${kafka-ingest.iteration}:value${kafka-ingest.iteration}

$ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr}
ALTER SYSTEM SET enable_zero_downtime_cluster_reconfiguration = true;
CREATE CLUSTER cluster1 ( SIZE = 'scale=1,workers=1');
GRANT ALL ON CLUSTER cluster1 TO materialize;

Expand Down Expand Up @@ -6435,13 +6434,6 @@ def workflow_test_zero_downtime_reconfigure(
> SELECT count(*) FROM kafka_tbl
1000
"""))
c.sql(
"""
ALTER SYSTEM RESET enable_zero_downtime_cluster_reconfiguration;
""",
port=6877,
user="mz_system",
)


def workflow_test_pending_replica_audit_events(
Expand All @@ -6457,11 +6449,10 @@ def workflow_test_pending_replica_audit_events(
"""
c.up("materialized")

# Enable the WAIT surface and drive the controller tick down so the (empty)
# cluster's reconfiguration converges quickly.
# Drive the controller tick down so the (empty) cluster's reconfiguration
# converges quickly.
c.sql(
"""
ALTER SYSTEM SET enable_zero_downtime_cluster_reconfiguration = true;
ALTER SYSTEM SET cluster_controller_tick_interval = '5ms';
CREATE CLUSTER test_audit (SIZE = 'scale=1,workers=1');
GRANT ALL ON CLUSTER test_audit TO materialize;
Expand Down Expand Up @@ -6556,7 +6547,6 @@ def workflow_test_pending_replica_audit_events(
c.sql(
"""
DROP CLUSTER test_audit CASCADE;
ALTER SYSTEM RESET enable_zero_downtime_cluster_reconfiguration;
""",
port=6877,
user="mz_system",
Expand Down
2 changes: 1 addition & 1 deletion test/launchdarkly-flag-consistency/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@
enable_repr_typecheck
enable_unified_cluster_arrangment
enable_yugabyte_connection
enable_zero_downtime_cluster_reconfiguration
kafka_default_metadata_fetch_interval
mysql_offset_known_interval
persist_enable_arrow_lgalloc_noncc_sizes
Expand Down Expand Up @@ -516,7 +517,6 @@
"enable_lgalloc",
"enable_timely_zero_copy_lgalloc",
"enable_upsert_paged_spill",
"enable_zero_downtime_cluster_reconfiguration",
"kafka_client_id_enrichment_rules",
"kafka_progress_record_fetch_timeout",
"kafka_socket_timeout",
Expand Down
6 changes: 0 additions & 6 deletions test/pg-cdc/cluster-graceful-reconfiguration.td
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
# new replica until cut-over drops the old one. Readiness must therefore not
# wait for the source to hydrate on the target, but must still wait for the
# target's processes to come online before cutting over.
#
# The background flag is pinned explicitly so the test does not depend on the
# harness defaults.

$ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr}
ALTER SYSTEM SET enable_zero_downtime_cluster_reconfiguration = true

> CREATE SECRET pgpass AS 'postgres'
> CREATE CONNECTION pg TO POSTGRES (
Expand Down
5 changes: 0 additions & 5 deletions test/sqllogictest/managed_cluster.slt
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,6 @@ CREATE CLUSTER foo SIZE invalid_size, REPLICATION FACTOR 0
statement error creating cluster replica would violate max_replicas_per_cluster limit \(desired: 9999999, limit: 5, current: 0\)
CREATE CLUSTER foo SIZE 'scale=1,workers=1', replication factor 9999999;

simple conn=mz_system,user=mz_system
ALTER SYSTEM SET enable_zero_downtime_cluster_reconfiguration = true;
----
COMPLETE 0

statement ok
CREATE CLUSTER foo (SIZE 'scale=1,workers=1')

Expand Down
5 changes: 1 addition & 4 deletions test/testdrive/cluster-controller.td
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ $ set-sql-timeout duration=120s

# Drive the tick interval down so the controller ticks ~hundreds of times across
# the waits below. It is re-read each tick, so the flip takes effect without a
# restart. The graceful cases use the WITH (WAIT ...) surface, whose planner
# acceptance is gated on enable_zero_downtime.
# restart.
$ postgres-execute connection=postgres://mz_system@${testdrive.materialize-internal-sql-addr}/materialize
ALTER SYSTEM SET cluster_controller_tick_interval = '5ms'
ALTER SYSTEM SET enable_zero_downtime_cluster_reconfiguration = true

# ----- Baseline reconcile is a no-op -----
#
Expand Down Expand Up @@ -1432,7 +1430,6 @@ scale=1,workers=2 0
# Restore pristine server state (including the tick-interval override).
$ postgres-execute connection=postgres://mz_system@${testdrive.materialize-internal-sql-addr}/materialize
ALTER SYSTEM RESET cluster_controller_tick_interval
ALTER SYSTEM RESET enable_zero_downtime_cluster_reconfiguration
ALTER SYSTEM RESET enable_background_alter_cluster
ALTER SYSTEM RESET enable_auto_scaling_strategy
ALTER SYSTEM RESET enable_hydration_burst
Loading