Repository navigation
Cherry pick #103252 to 26.3: Add SYSTEM PAUSE VIEW and SYSTEM PAUSE VIEWS - #104388
Merged
robot-ch-test-poll2 merged 6 commits intoMay 11, 2026
Merged
Conversation
Unlike `SYSTEM STOP VIEW`, which cancels the currently running refresh, `SYSTEM PAUSE VIEW` only prevents future refreshes from starting and lets the ongoing refresh complete normally. Undone by `SYSTEM START VIEW`. Plumbed through the existing action-lock machinery by adding a new `ActionLocks::ViewRefreshPause` block type that dispatches to `RefreshTask::pause` (stop-without-interrupt). `SYSTEM START VIEW` now drops both the `ViewRefresh` and `ViewRefreshPause` locks so it uniformly undoes both `STOP` and `PAUSE`. Made-with: Cursor
`SYSTEM PAUSE VIEWS` / `SYSTEM START VIEWS` operate server-wide, so a parallel test that issues `SYSTEM START VIEWS` would race with this test's assertion that all its views are in the `Disabled` state. Observed in flaky check at https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=103252&sha=b0daef3f630d999968660b722401fc27ddd48ecb&name_0=PR&name_1=Stateless+tests+%28amd_asan_ubsan%2C+flaky+check%29 (PR: #103252) Also shrink the slow-refresh workload from 20 rows to 5 rows so the test stays well under the 180s flaky-check limit. Made-with: Cursor
`RefreshTask::stop` used `std::exchange(stop_requested, true)` as an early-return guard. After my previous commit, `RefreshTask::pause` also sets this flag, so a `SYSTEM STOP VIEW` issued after `SYSTEM PAUSE VIEW` would hit the early return and skip `interruptExecution`, leaving the in-flight refresh to run to completion — regressing the documented `STOP VIEW` semantic. Keep the guard only for the reschedule call, and always call `interruptExecution` (which is already idempotent via `execution.interrupt_execution`). Added a regression test for the PAUSE-then-STOP sequence. Review: #103252 (comment) Made-with: Cursor
Add SYSTEM PAUSE VIEW and SYSTEM PAUSE VIEWS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original pull-request #103252
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job