Skip to content

sql: reject ALTER CLUSTER ... WITH (WAIT ...) on unmanaged clusters#37362

Merged
mtabebe merged 1 commit into
MaterializeInc:mainfrom
mtabebe:ma/sql-217
Jun 30, 2026
Merged

sql: reject ALTER CLUSTER ... WITH (WAIT ...) on unmanaged clusters#37362
mtabebe merged 1 commit into
MaterializeInc:mainfrom
mtabebe:ma/sql-217

Conversation

@mtabebe

@mtabebe mtabebe commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Problem:
ALTER CLUSTER c SET (MANAGED = false) WITH (WAIT FOR '...') and the WAIT UNTIL READY variant were silently accepted: the WAIT options were parsed and then dropped without effect, contrary to the error other managed-only options produce ("not supported for unmanaged clusters").

Solution:
Validate the raw with_options in the unmanaged arm instead of the typed strategy. Any non-empty WITH clause on an unmanaged target now errors consistently with the sibling option checks.

Testing:
Added four cases to test/sqllogictest/managed_cluster.slt covering WAIT FOR and WAIT UNTIL READY against (a) an already-unmanaged cluster and (b) a managed->unmanaged transition

Fixes SQL-217.

Problem:
`ALTER CLUSTER c SET (MANAGED = false) WITH (WAIT FOR '...')` and the
`WAIT UNTIL READY` variant were silently accepted: the WAIT options were
parsed and then dropped without effect, contrary to the error other
managed-only options produce ("not supported for unmanaged clusters").

Solution:
Validate the raw `with_options` in the unmanaged arm instead of the
typed strategy. Any non-empty `WITH` clause on an unmanaged target now
errors consistently with the sibling option checks.

Testing:
Added four cases to `test/sqllogictest/managed_cluster.slt` covering
`WAIT FOR` and `WAIT UNTIL READY` against (a) an already-unmanaged
cluster and (b) a managed->unmanaged transition

Fixes SQL-217.
@mtabebe mtabebe marked this pull request as ready for review June 30, 2026 15:24
@mtabebe mtabebe requested a review from a team as a code owner June 30, 2026 15:24

@SangJunBak SangJunBak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this is a bit restrictive in case we add WITH options for unmanaged clusters, I think we can easily fix it when it actually becomes a problem.

@mtabebe mtabebe merged commit 9fa76fc into MaterializeInc:main Jun 30, 2026
124 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants