Skip to content

Check the query cancellation while filling system.parts and its siblings - #113909

Merged
alexey-milovidov merged 57 commits into
masterfrom
fix/system-parts-cancellation
Sep 18, 2026
Merged

alexey-milovidov merged 57 commits into
masterfrom
fix/system-parts-cancellation

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 8, 2026 •

Copy link
Copy Markdown
Member

The tables based on StorageSystemPartsBase (system.parts, system.parts_columns, system.projection_parts, system.projection_parts_columns) build the whole result eagerly in initializePipeline, so a cancelled or timed out query kept building rows over every storage and part until the very end. In a stress test with ThreadFuzzer this took minutes and tripped the hung check: a SELECT over system.parts_columns (with a filter matching every active part on the server) stayed in the process list for 252 seconds with is_cancelled = 1 and max_execution_time = 10. Check the query status per storage and per part, following the pattern of system.zookeeper and system.remote_data_paths.

The check also covers the storage-discovery prepass in StoragesInfoStream (the eager enumeration of all databases and tables), the analogous prepass in StoragesDroppedInfoStream (so system.dropped_tables_parts is interruptible as well), the skip loop in StoragesInfoStreamBase::next, and the per-storage part enumeration itself: the MergeTreeData helpers (getDataPartsVectorForInternalUsage, getAllDataPartsVector, getProjectionPartsVectorForInternalUsage, getAllProjectionPartsVector) take an optional need_stop callback that is checked periodically while the parts snapshot is being built. The two column-oriented tables additionally check the query status inside their column-enumeration loops and their metadata prepass, so a very wide table does not create a long uninterruptible stretch inside a single storage. The return value of checkTimeLimit is honored, so with timeout_overflow_mode = 'break' the eager build stops at the soft deadline and returns the rows collected so far.

The table-lock acquisition in StoragesInfoStreamBase::tryLockTable is interruptible as well: instead of a single wait inside RWLockImpl::getLock for the whole lock_acquire_timeout, the lock is acquired in 100 ms slices with a query-status poll between the attempts (the total timeout and the DEADLOCK_AVOIDED semantics are preserved, and when the total budget is exhausted, the exception reports the full lock_acquire_timeout rather than the last slice), so a killed or soft-timed-out query does not sit in the lock wait while a concurrent DDL query holds the drop lock. The test 04869_system_parts_lock_wait_cancellation pins this with a share lock held by a long SELECT and a DROP TABLE in an Ordinary database queued behind it.

The test uses the new slowdown_system_parts_enumeration failpoint, which only affects the specially named test tables (so concurrently running tests are unaffected). It sleeps 500 ms on every enumerated part, so building the full result for a 20-part table takes at least 10 seconds, and it sleeps 1 second per COLUMNS_CANCELLATION_CHECK_PERIOD (128) enumerated columns of a part, so building the full system.parts_columns / system.projection_parts_columns result over a single part with 1,025 columns (and a projection over all of them) takes at least 8 seconds. The test asserts that queries with a 1 second deadline in the break mode finish well under that (the elapsed time is taken from system.query_log, because the startup of clickhouse-client alone takes seconds in the debug and sanitizer builds), which is only possible by stopping at the per-part and per-column cancellation checkpoints. Timed assertions are needed because a plain row-count assertion cannot distinguish a build with the fix from one without: in the break mode the executor drops the eagerly built result after the deadline in both cases. The test also asserts partial row counts under a pre-expired deadline for all five tables, including system.dropped_tables_parts over a deterministic dropped-table fixture. The pre-expired-deadline checks also run under the failpoint, so the fewer-rows assertion is deterministic even on a machine fast enough to build the whole result in under a millisecond.

For tables with the _snap name marker, the failpoint additionally slows down the parts-snapshot walks inside MergeTreeData (500 ms per enumerated part) and makes them poll the stop callback on every element, and for tables with the _meta name marker it slows down the column-metadata prepass of the column-oriented tables (1 second per 128 enumerated metadata columns), so the timed checks also prove that the snapshot materialization and the prepass are interruptible: all six of these checks fail against a binary with the need_stop polls and the prepass checkpoints disabled. For tables with the _discovery name marker the failpoint slows down the database/table discovery walk of StoragesInfoStream itself (500 ms per walked table); the corresponding fixture lives in a dedicated database, because the walk enumerates every table of the walked database regardless of the query's table filter, and its check likewise fails against a binary with the walk's checkpoint disabled.

Caught by Stress test (arm_asan_ubsan, s3): https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113722&sha=ceedb772f6aa36e221d25ce48f9af71f032a7b08&name_0=PR&name_1=Stress%20test%20%28arm_asan_ubsan%2C%20s3%29

Related: #113722

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Queries over system.parts, system.parts_columns, system.projection_parts, system.projection_parts_columns, and system.dropped_tables_parts now react to cancellation and max_execution_time while the result is being built.


Workflow [PR]
Sync PR [sync-upstream/pr/113909]

The tables based on `StorageSystemPartsBase` (`system.parts`, `system.parts_columns`,
`system.projection_parts`, `system.projection_parts_columns`) build the whole result
eagerly in `initializePipeline`, so a cancelled or timed out query kept building rows
over every storage and part until the very end. In a stress test with ThreadFuzzer this
took minutes and tripped the hung check: a `SELECT` over `system.parts_columns` stayed
in the process list for 252 seconds with `is_cancelled = 1` and `max_execution_time = 10`.
Check the query status per storage and per part.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113722&sha=ceedb772f6aa36e221d25ce48f9af71f032a7b08&name_0=PR&name_1=Stress%20test%20%28arm_asan_ubsan%2C%20s3%29
PR: #113722

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0d49b37]

Summary: ✅


AI Review

Summary

This PR makes the eager readers behind system.parts, system.parts_columns, system.projection_parts, system.projection_parts_columns, and system.dropped_tables_parts poll QueryStatus during storage discovery, lock waits, part-snapshot materialization, and per-column enumeration, and it adds focused stateless coverage for those checkpoints. I do not see a remaining correctness, cancellation, or test-coverage issue in the current merge result.

Missing context / blind spots
  • ⚠️ I could not fetch a current full Praktika result set for the latest PR head from the PR page today; the only machine-readable report exposed there was the older Build profile diff entry. The added regression tests are still good evidence for the bug fix, but a fresh full CI run would close that operational blind spot.
Final Verdict
  • Status: ✅ Approve

LLVM Coverage Report

Measured on commit 0d49b37.

Metric Baseline Current Δ
Lines 88.50% 88.50% +0.00%
Functions 91.80% 91.80% +0.00%
Branches 80.70% 80.70% +0.00%

Changed lines: Changed C/C++ lines covered: 343/357 (96.08%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Aug 8, 2026
alexey-milovidov and others added 2 commits August 8, 2026 16:01
…eak' overflow mode

Two changes after the AI review on #113909:
- `StoragesInfoStreamBase` now keeps the `QueryStatus` of the query and checks it
  inside the eager database/table enumeration in `StoragesInfoStream` and in the
  `next` skip loop, so cancellation works during the storage-discovery prepass too.
- All `checkTimeLimit` calls now use the return value: with
  `timeout_overflow_mode = 'break'` the eager build stops early and returns the
  rows collected so far instead of running to completion.

Co-Authored-By: Claude Fable 5 <[email protected]>
The style check requires `ErrorCodes::LOGICAL_ERROR` to be defined in the
same file that uses it. The usage moved from `StorageSystemPartsBase.h` to
`StorageSystemPartsBase.cpp` when `next` was moved out of the header, but
the definition stayed in the header.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113909&sha=69a9d9df45384afc99967af8f9c44a1677730cea&name_0=PR&name_1=Style%20check

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 0d49b3792 with master f77edf0f9 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

689 translation units recompiled, 5508 s compile time in total, 689 of them have a recent master baseline.

Median compile-time ratio to the baselines is ×0.94 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio.
The matched translation units cost -430.2 s (-7%) in total before that adjustment.

Translation unit Master PR Δ vs median
src/Processors/QueryPlan/ReadFromMergeTree.cpp 34.8 s 24.6 s -8.1 s (-25%)

Job report

…stem.dropped_tables_parts`

- `StoragesDroppedInfoStream` now checks the query status in its eager
  `getTablesMarkedDropped` scan, so a killed or soft-timed-out query over
  `system.dropped_tables_parts` stops during the storage-discovery prepass
  and returns the rows collected so far in the 'break' overflow mode.
- The `MergeTreeData` part-enumeration helpers used by the `system.parts`
  family (`getDataPartsVectorForInternalUsage`, `getAllDataPartsVector`,
  `getProjectionPartsVectorForInternalUsage`, `getAllProjectionPartsVector`)
  accept an optional `need_stop` callback that is checked periodically during
  the walk over the parts set, so cancellation is noticed while the per-storage
  snapshot is being built, not only after the full vector is materialized.
- Add a test for the 'break' overflow mode over the `system.parts` family.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The Stress test (arm_asan_ubsan, s3) failure on 375ee4c is unrelated to this PR: it is the known master-wide LeakSanitizer report (all-indirect leaks through Context::createCopy / QueryTreeBuilder::buildSelectExpression / QueryPlan nodes) caused by the materialized-CTE plan reference cycle. The fix is in progress: #113397.

… part

The two column-oriented tables of the `system.parts` family polled `QueryStatus`
only at the part boundary. On a very wide table, `StorageSystemPartsColumns` and
`StorageSystemProjectionPartsColumns` could then spend a long time in the
metadata prepass over `getColumns` and in the per-part column-enumeration loop
without consulting it, so `KILL QUERY` and `timeout_overflow_mode = 'break'`
still could not interrupt building the result of a single storage.

Both loops now check `checkTimeLimit` every `COLUMNS_CANCELLATION_CHECK_PERIOD`
columns. In the 'break' mode the column loop stops with a partial result, while
the metadata prepass gives up the whole storage, because a partially filled
`columns_info` would report wrong column defaults.

The regression test is rewritten as a shell test with fixtures large enough that
the deadline is guaranteed to fire while the result is being built: a table with
1000 parts for the per-part loops and a table with 3000 columns in a single part
for the column-enumeration loops. It now asserts that fewer rows than the full
result are returned, so it fails if the checkpoints are removed.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Both CI failures on 525eb663 are unrelated to this PR and are handled:

@clickhouse-gh clickhouse-gh Bot added pr-bugfix Pull request with bugfix, not backported by default and removed pr-ci labels Aug 10, 2026
… fixtures

The test 04828_system_parts_family_time_limit_break timed out in the flaky
check: the fixtures (a 1000-part table and a 3000-column table) were too heavy
for repeated runs on the debug and sanitizer builds, while the pre-expired
deadline fires before the first storage is processed anyway, so the fixture
size added nothing. Worse, the test could not fail on a build without the fix:
in the 'break' overflow mode the executor drops the eagerly built result after
the deadline regardless of the cancellation checkpoints, so a plain row-count
assertion passes on master too, and the Bugfix validation had nothing to
validate.

Add the `slowdown_system_parts_enumeration` failpoint: when enabled, the
per-part loops of the `system.parts` family sleep 100 ms on every enumerated
part of the tables named `t_slowdown_system_parts*` (only specially named
tables, so concurrently running tests are unaffected). Building the full
result for a 100-part table then takes at least 10 seconds, and the test
asserts that a query with a 1 second deadline in the 'break' mode finishes
well under that - which is only possible by stopping between the parts.
Without the per-part checkpoints the elapsed-time assertions fail, and on a
build without the fix the test fails at `SYSTEM ENABLE FAILPOINT` already.

Also add a deterministic dropped-table fixture (the async-drop pattern from
02698_marked_dropped_tables.sql) so that the `system.dropped_tables_parts`
checks assert a partial row count instead of merely not throwing, addressing
the review comment.

Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113909&sha=26a9645138c7dc1dca9a31ab082b1734623d514f&name_0=PR
PR: #113909

Co-Authored-By: Claude Fable 5 <[email protected]>
The test `04828_system_parts_family_time_limit_break` exceeded the 180
second limit of the flaky check with the debug build:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113909&sha=a99197d98f2ea59b42bab0b3432b32485105c983&name_0=PR&name_1=Stateless%20tests%20(amd_debug%2C%20flaky%20check)

The dominant costs were the fixtures (two 100-part inserts and a
300-column table) and 13 separate client invocations, both of which are
much slower with the debug build. The `slowdown_system_parts_enumeration`
failpoint now sleeps 500 ms per enumerated part instead of 100 ms, so
20 parts still guarantee the same 10 second full build for the timed
checks; the column fixture shrinks to 100 columns, and all the quick
checks run in a single client invocation. Local release run: 7.5 seconds
instead of 12, with the fixture cost reduced about fivefold.
…imed check

The `slowdown_system_parts_enumeration` failpoint now also sleeps 1 second
per `COLUMNS_CANCELLATION_CHECK_PERIOD` (128) enumerated columns of a part
of the specially named tables, and the test grows a wide fixture (a single
part with 1301 columns and a projection over all of them): building its
full `system.parts_columns` / `system.projection_parts_columns` result
takes at least 10 seconds (measured: 10.6 s), while the timed checks with
a 1 second break deadline finish in about 1.6 seconds - which is only
possible when the column-enumeration loops poll the query status. The
sleep is a statement separate from the checkpoint, so deleting the
checkpoints does not delete the slowdown and the elapsed time assertions
fail.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 CI failures on a99197d98f2e and how they were handled:

@groeneai

Copy link
Copy Markdown
Collaborator

Acknowledged, investigating.

One correction on the breadth: only 2 of those 4 CIDB rows are this signature. The 600 s amd_msan, WasmEdge timeouts (here and on PR 113008) are one class; the 2026-07-15 pair on PR 109861 / PR 104657 failed fast (1.5 s and 13.8 s) under amd_asan_ubsan, distributed plan, so those look like a separate defect. I will classify them separately rather than fold them into one fix.

I will follow up here with the PR, or with my findings if it turns out not to be actionable.

…ts` is exhausted

The sliced acquisition in `StoragesInfoStreamBase::tryLockTable` re-threw the
`DEADLOCK_AVOIDED` exception of the last 100 ms slice, so a query that really
waited the whole `lock_acquire_timeout` reported `... has timed out! (100ms)`.
Amend the exception with the total timeout, keeping the original message with
the owner query ids of the lock.

Addresses the review: #113909 (comment)
…cellation test

The suite proved the dropped-table discovery, part-snapshot, metadata-prepass,
and per-part / per-column checkpoints, but nothing forced the ordinary
database/table discovery walk of `StoragesInfoStream` to cross its
`checkTimeLimit` branch. The `slowdown_system_parts_enumeration` failpoint now
sleeps 500 ms on every walked table named `t_slowdown_system_parts_discovery*`,
and the test adds a 10-table fixture in a dedicated database (the walk
enumerates every table of the walked database regardless of the query's table
filter, so keeping the fixture next to the others would slow every other
check), with the same sleep-count assertion as the other checks. Verified
load-bearing: against a binary with the walk's checkpoint disabled, the check
reports 10 sleeps and fails, while the rest of the suite stays green.

Addresses the review: #113909 (comment)
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The Stress test (arm_release) failure on a557e3d is unrelated to this PR: the server could not restart during the stress run because a leftover Alias → Alias chain from 04238_storage_alias_missing_target_merge (test_1.outer_alias_to_inner_alias) fails ATTACH with Alias table cannot refer to another Alias table. This is the known master-wide issue #116207, and the fix is in progress: #116153.

Pushed 3af8c41 (master merged) addressing both AI-review findings: the exhausted sliced lock wait now reports the full lock_acquire_timeout (516cdf5), and the StoragesInfoStream database/table discovery walk is now covered by the test with a dedicated 10-table fixture database and the same sleep-count assertion (verified to fail against a binary with the walk's checkpoint disabled). Both 04839 and 04869 pass locally against the new binary.

The opening comment still described the pre-`3077f6c3cac1` behavior
("returns the rows collected so far"), contradicting the note before the
second group of checks: a result chunk produced past the deadline never
reaches the rest of the pipeline, so no partial prefix is handed out.
Addresses the review thread.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The Stress test (arm_debug) failure on 3af8c41 is unrelated to this PR: the server aborted on the known Logical error: Inconsistent AST formatting for CREATE TABLE ... AS VALUES(...) PRIMARY KEY ... produced by the AST fuzzer (#116732), fixed by #116645, which merged into master on 2026-08-28 and was not yet in this branch.

Pushed 9560498: master merged (clean, pulls in the fix above), and the header comment of 04839_system_parts_family_time_limit_break reworded per the review thread — it no longer claims that the collected rows are returned after the deadline.

The test timed out (`Test runs too long (> 180s)`) in the `amd_debug`, `amd_msan` and
`amd_binary` flaky checks. Almost all of the time went into the fixture, not into the
checks: creating and filling the three tables with 1025 columns each (plus their `SELECT *`
projections) took 125 of the 180 seconds in the `amd_msan` run, because writing a part
costs time per column.

The width of those fixtures is dictated by `COLUMNS_CANCELLATION_CHECK_PERIOD`: the checks
need a part with enough columns to cross the checkpoint several times. Lower the period from
128 to 16 columns, which is a better cadence anyway - a poll is a clock read, while filling
the row of a single column allocates and copies much more than that - and narrow the fixtures
accordingly, from 1025 to 129 columns. A full enumeration still crosses the checkpoints 9
times per part, so the assertion of at most `MAX_SLEEPS` = 4 sleeps keeps its margin.

Verified locally against a release build: every check performs 1-2 sleeps, while a probe
query without a deadline over the same fixture performs 17, and the test now takes 21 seconds
instead of 180+.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master and fixed the only real red: the amd_debug, amd_msan and amd_binary flaky checks failed with Test runs too long (> 180s) for 04839_system_parts_family_time_limit_break.

The time went into the fixture, not into the checks — in the amd_msan run the three 1025-column tables (plus their SELECT * projections) cost 125 of the 180 seconds, because writing a part costs time per column. Their width was dictated by COLUMNS_CANCELLATION_CHECK_PERIOD, so the period is lowered from 128 to 16 columns (a better cadence anyway: a poll is a clock read, while filling the row of a single column allocates and copies much more) and the fixtures are narrowed from 1025 to 129 columns.

Verified locally against a release build: the test now takes 21 s instead of 180+, every check performs 1-2 failpoint sleeps (bound: MAX_SLEEPS = 4), and a probe query without a deadline over the same fixture performs 17 — so the regression detection keeps its margin.

The two Integration tests (amd_asan_ubsan, db disk, old analyzer, 2/6, 6/6) reds were job-level cancellations (The operation was canceled after 1h11m), with the reported failures happening at the moment of the cancellation — unrelated to this change.

@clickhouse-gh clickhouse-gh Bot added the comp-system-table system.* tables (introspection, system metadata, performance visibility). label Sep 4, 2026
alexey-milovidov and others added 2 commits September 9, 2026 07:18
The `parts_columns_snap_wide` and `projection_parts_columns_snap_wide`
checks claimed to cover the per-column checkpoints of
`StorageSystemPartsColumns` and `StorageSystemProjectionPartsColumns`
that run after the parts snapshot has already stopped. They cannot: the
snapshot walk stops only once the deadline has expired, and both
column-oriented consumers then break out on the `checkTimeLimit` at the
top of the per-part loop, before any per-column work. So both checks stay
green even with the inner checkpoints removed.

The per-column checkpoints themselves are already covered, by
`parts_columns_wide` and `projection_parts_columns_wide` over the
`_wide` fixture, where the snapshot is fast and the deadline fires
inside the column loop. Removing the `_snap_wide` fixture also drops one
129-column table with its `SELECT *` projection from the fixture, which
is what the test spends most of its time creating.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Pushed ea2745111308: master merged (clean, no submodule drift) with c3d15414b398 on top.

The only red on d8569ce3b513 is unrelated. Stress test (amd_tsan) aborted on Logical error: Not-ready Set is passed as the second argument for function 'globalIn' from an AST-fuzzer query (executeASTFuzzerQueries → FunctionIn::executeImpl, src/Functions/in.cpp:128); nothing in the stack touches system.parts. This is #107619, which the CI report itself labels and which was closed on 2026-09-04 — so the master merge should clear it.

Addressed the sole unresolved review thread by removing the _snap_wide fixture and its two checks. The claim they made was false: the snapshot walk stops only once the deadline has expired, after which both column-oriented consumers break out on the checkTimeLimit at the top of the per-part loop, before any per-column work — so those two checks would have stayed green with the inner checkpoints removed. The per-column checkpoints stay covered by parts_columns_wide / projection_parts_columns_wide over the _wide fixture, where the snapshot is fast and the deadline fires inside the column loop. As a side effect this drops one 129-column table with its SELECT * projection from the fixture, which is where this test spends most of its time.

Verified locally against an isolated release server: 04839_system_parts_family_time_limit_break and 04869_system_parts_lock_wait_cancellation both pass (22.4 s and 4.9 s), clickhouse relinks clean after the merge, and the style check reports no real findings.

alexey-milovidov and others added 2 commits September 17, 2026 07:57
…dary

The retry loop in `StoragesInfoStreamBase::tryLockTable` used `tryLockForShare`
as its 100 ms poll primitive, and `IStorage::tryLockTimed` throws
`DEADLOCK_AVOIDED` on every timed-out probe, so a `system.parts` query waiting
behind a DDL query with `lock_acquire_timeout = 60` constructed and caught about
600 exceptions before it got the lock or reached the real timeout.

Add an `IStorage::tryLockForShare` overload that waits in slices of a given
check period and polls a `need_stop` callback between them, on top of
`RWLockImpl::getLock`, which returns a nullptr on a timed-out slice instead of
throwing. Only the exhaustion of the whole `lock_acquire_timeout` throws
`DEADLOCK_AVOIDED`, and the message reports the total wait and the owner
query ids, as before. `tryLockTable` becomes a plain call of that overload.

Verified with `04869_system_parts_lock_wait_cancellation`: one run now adds
exactly one `DEADLOCK_AVOIDED` to `system.errors` (the intended 1 s probe,
reporting 1000 ms), and the two deadline queries throw nothing while waiting.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@alexey-milovidov

alexey-milovidov commented Sep 17, 2026 •

Copy link
Copy Markdown
Member Author

🕵 Merged master (392e78b, 8 days and 4569 commits behind, no conflicts, no submodule drift) and adopted the review finding about the exception-based lock polling in 0d49b37 (see the thread reply). Both own tests pass locally against the rebuilt binary: 04839 in 22.9 s and 04869 in 4.7 s.

The only red on ea27451 was Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel), which hit the job-level 9000 s timeout at test 12501 of 13806 with no failing test: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=113909&sha=ea2745111308944b255615a10d65d7a7f23f0200&name_0=PR&name_1=Stateless%20tests%20(amd_llvm_coverage%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel) — unrelated to this PR. @groeneai, investigate the failure and provide a fix in a separate PR (the coverage-instrumented job does not fit into its timeout). If the fix is already in progress, link it here.

@groeneai

Copy link
Copy Markdown
Collaborator

The fix is in progress and it is mine: #116209, open since 2026-08-24. It splits this exact job into 1/2 + 2/2, and its AsyncInsert twin with it: those two are the only coverage stateless parallel jobs still running the whole suite un-batched, which is why they are the two that saturate the 9000 s budget. So there is no separate PR to write. This is the fourth report of the same cap, after #114417 (which #116209 came out of), #104431 and #111932.

The rate is compounding while it waits. At-cap kills of the pair, counting CIDB error runs whose check_duration_ms sits at the cap: 1 in June, 13 in July, 31 in August, 61 in the first 17 days of September. Eight of the 78 since 2026-08-24 were on master. The run you linked is one of them: 9046 s, no test results.

The runs that do finish are close behind. Their p99 was 7741 s in August and is 8155 s so far in September against the 9000 s limit, so a run that is merely slower than usual now ends at the cap instead of reporting.

#116209 has had no review since it opened. It is also CONFLICTING again after master moved past your 2026-09-12 merge, since it touches ci/defs/ plus both generated workflow YAMLs, and any job-set change on master reconflicts it.

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is over-done, but I like the change. It is thorough and correct.

@alexey-milovidov alexey-milovidov self-assigned this Sep 18, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 18, 2026
Merged via the queue into master with commit f04ea3b Sep 18, 2026
0 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix/system-parts-cancellation branch September 18, 2026 12:31
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-system-table system.* tables (introspection, system metadata, performance visibility). pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants