Skip to content

adapter: make WAIT FOR roll back on timeout - #38621

Merged
aljoscha merged 1 commit into
MaterializeInc:mainfrom
aljoscha:aj/docs-wait-for-semantics
Sep 2, 2026
Merged

adapter: make WAIT FOR roll back on timeout#38621
aljoscha merged 1 commit into
MaterializeInc:mainfrom
aljoscha:aj/docs-wait-for-semantics

Conversation

@aljoscha

@aljoscha aljoscha commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Motivation

ALTER CLUSTER ... WITH (WAIT FOR ...) currently forces a cut-over when its
timeout is processed while the target replicas remain unhydrated. This differs
from the safer ROLLBACK default used by WAIT UNTIL READY and can introduce
unexpected downtime.

Description

Make WAIT FOR use ROLLBACK when its deadline is processed while the target
remains unhydrated. A hydrated target still cuts over. Users who need a forced
cut-over can request it explicitly with
WAIT UNTIL READY (..., ON TIMEOUT = 'COMMIT').

Update the user and design documentation to describe the safe timeout behavior.
Tests that intentionally require a forced cut-over now spell out
ON TIMEOUT COMMIT. The cluster-controller testdrive coverage verifies that an
unhydrated WAIT FOR target times out and leaves the realized cluster shape
unchanged.

This changes a private-preview SQL option.

Verification

The existing cluster reconfiguration tests were updated to cover the new timeout
action and preserve explicit forced cut-over scenarios. Documentation build and
link validation covers the updated user pages.

WAIT FOR currently forces a cut-over when the controller handles an expired deadline while the target remains unhydrated. Use the safer ROLLBACK action instead while preserving cut-over when the target hydrates. Users can still request a forced cut-over explicitly with ON TIMEOUT COMMIT.
@aljoscha
aljoscha force-pushed the aj/docs-wait-for-semantics branch from 6374186 to 1605348 Compare September 2, 2026 10:05
@aljoscha aljoscha changed the title doc: clarify WAIT FOR cluster resize behavior adapter: make WAIT FOR roll back on timeout Sep 2, 2026
@aljoscha
aljoscha force-pushed the aj/docs-wait-for-semantics branch from 1605348 to c634bec Compare September 2, 2026 10:07
@aljoscha
aljoscha marked this pull request as ready for review September 2, 2026 11:38
@aljoscha
aljoscha requested review from a team as code owners September 2, 2026 11:38

@maheshwarip maheshwarip 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.

approved for docs

@aljoscha
aljoscha merged commit b241928 into MaterializeInc:main Sep 2, 2026
92 checks passed
@aljoscha
aljoscha deleted the aj/docs-wait-for-semantics branch September 2, 2026 14:17
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.

3 participants