Repository navigation
Fix 04105_system_pause_view and 04319_system_stop_all_background with the database disk on object storage - #128859
Conversation
… the database disk on object storage `interrupt_running_refresh` checks `status = 'Running' and read_rows between 1 and 8` one client start-up after `SYSTEM REFRESH VIEW`. The refresh is already `Running` while it creates its target table, and with the database disk on object storage that takes seconds, so the check saw `read_rows = 0` and printed 0. Re-creating the view repeated the same timing, so all 10 attempts missed: `<3a: refresh running before stop: 0>` in `Stateless tests (amd_asan_ubsan, db disk, distributed plan, targeted)` (reported on ClickHouse#92472; there the check ran 0.4-0.6 s after the refresh started and the refresh INSERT 0.6-2.6 s after it). Wait until the refresh has read its first row, or failed, before the one-call check. A new view's `read_rows` keeps its value after the refresh, so the wait cannot miss it (no hang like the one ClickHouse#125034 fixed), and `clickhouse_test_time_left` bounds it. The `read_rows <= 8` check, the one-call statements and the retry from ClickHouse#127917 are unchanged, so a STOP that lands after the refresh is still retried and an all-miss is still a labelled mismatch. Validated on master 4944813 CI builds: with the database disk on MinIO and 10 ms injected latency each way, before 14/14 FAIL (release and asan_ubsan), after 56/56 and 42/42 OK, one attempt per helper call; a failpoint that holds the refresh before it reads fails before and passes after; 50/50 OK per test with random settings on a local disk and on the database disk. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review of the same diff (0 findings). No findings to adjudicate. Session id: cron:clickhouse-review-slot-8:20261103-005500 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261102-230500 |
|
cc @tuanpach, could you review this and add the |
|
Workflow [PR], commit [bf87d7a] Summary: ✅ AI ReviewSummaryPR #128859 makes Missing context / blind spots
Final VerdictStatus: ✅ Approve |
e497200
Related: #92472
Related: #127917
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix failures of the tests
04105_system_pause_viewand04319_system_stop_all_backgroundwhen the database metadata is on object storage, where the check that the refresh is running landed before the refresh had read its first row.Description
Failing job: Stateless tests (amd_asan_ubsan, db disk, distributed plan, targeted),
<3a: refresh running before stop: 0>instead of1(reported in #92472 (comment), not caused by that PR).interrupt_running_refreshrunsSYSTEM REFRESH VIEWand then, one client start-up later, checksstatus = 'Running' and read_rows between 1 and 8. The refresh is alreadyRunningwhile it creates its target table, and with the database disk on object storage that takes seconds, so the check seesread_rows = 0. In the failing job'squery_logthe check ran 0.4-0.6 s afterSYSTEM REFRESH VIEWand the refresh INSERT started 0.6-2.6 s after it, so 26 of 28 attempts sawread_rows = 0. Re-creating the view repeats the same timing, so all 10 attempts miss.The helper now waits until the refresh has read its first row (or failed) before the one-call check. A new view's
read_rowskeeps its value after the refresh, so the wait cannot miss it, andclickhouse_test_time_leftbounds it. The one-call check and the retry for the upper bound stay as they are..referencefiles are unchanged.Validation, on master
4944813cca46CI binaries:-j 7 --test-runs 7: before 14/14 FAIL (release) and 14/14 FAIL (asan_ubsan), 10 attempts per call; after 56/56 (release) and 42/42 (asan_ubsan) OK, 1 attempt per call.refresh_mv_pause_after_executor_publishedholding the refresh before it reads: before FAIL on all four label lines, after OK.PAUSEinstead ofSTOP: fails10 0; a forced 9 s delay before the check: fails on the label line.Workflow [PR]
Sync PR [sync-upstream/pr/128859]
Version info
26.11.1.1245-master(included in26.11and later)