Repository navigation
Speed up four tests that exceed 180 s in the flaky check - #125263
alexey-milovidov merged 2 commits into
Conversation
The flaky check runs each changed test 50 times on 8 workers with the ThreadFuzzer environment, which `clickhouse-local` also inherits since 6b62ea4. Four tests then exceed the 180 s per-run limit: - 03173: 228 `clickhouse-local` launches. Encode all values in one process with `INTO OUTFILE` and decode them in another with `file()`. The reference is unchanged. - 04073: `OPTIMIZE ... FINAL` only rewrote the single part the INSERT already produced. Drop it and assert that there is one active part. - 00564: the 1000000-row sections print nothing. Use 200000 rows, and keep the vertical-merge section's parts Wide (`min_bytes_for_wide_part = 0`) so it still merges vertically. - 00223: the analyzer folds `randConstant()` on the initiator, so both shards always read the same key set and the 10 repetitions per block never covered shards with different keys. Run the four per-shard key combinations once each via `shardNum()` and check exact values. Related: ClickHouse#115050 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review (click to expand)
|
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261011-182600 |
|
Workflow [PR], commit [d8fa3d9] Summary: ✅ AI ReviewSummaryThis PR makes four slow stateless tests cheaper in the flaky check without changing their intended coverage: Final Verdict
|
CI finish ledger - 5233a9fEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
Session id: cron:our-pr-ci-monitor:20261012-100010 |
|
@groeneai chjeck CI and merge master into the branch |
…-check-slow-tests
The removed `OPTIMIZE ... FINAL` used to merge the table into one part. The INSERT already writes one part: its 131072 rows are below `min_insert_block_size_rows` and the squashed `LowCardinality` block is far below `min_insert_block_size_bytes`, so squashing emits a single block. Neither setting is randomized. The randomized settings that touch this INSERT (`max_insert_threads`, `max_block_size`, `optimize_trivial_insert_select`) and `async_insert` still give one part. Assert the part count instead of relying on it, as ClickHouse#125263 does for 04073. With `min_insert_block_size_rows = 100000` the INSERT writes two parts and the test now fails on this line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#125263 reduced the two 1000000-row inserts in this test to 200000 rows, so it no longer averages over 60 s under MSan. Touching the test made the flaky check run it, and in the `CH Inc sync` flaky check (`amd_asan_ubsan`, `s3 storage`, `meta in keeper`) it took 187 s, over the 180 s limit. Leave the file unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`03173_row_binary_and_native_with_binary_encoded_types`, `04073_parallel_replicas_in_order_splits`, `00223_shard_distributed_aggregation_memory_efficient` and `04143_low_cardinality_single_dict_read_amplification` now average well below 60 s under MSan after fixture speedups on `master` (#125263, #125795). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #115050
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required (CI fix).
Description
#115050 only edits the
Tagsline of four tests, and its flaky check fails all four withTest runs too long (> 180s)acrossamd_binary,amd_debugandamd_asan_ubsan(amd_binary report). Any PR that touches them gets this red. The flaky check runs each test 50 times on 8 workers under the ThreadFuzzer environment, whichclickhouse-localalso inherits since 6b62ea4. Each test has one dominant cost:03173_row_binary_and_native_with_binary_encoded_types: 228clickhouse-locallaunches. One process now encodes all values withINTO OUTFILE, another decodes them withfile(). Reference unchanged.04073_parallel_replicas_in_order_splits:OPTIMIZE TABLE ... FINALtook 193-209 s of each run and only rewrote the single part the INSERT had already made (1e6 rows fit in one insert block). It is replaced by a check that there is exactly one active part.00564_versioned_collapsing_merge_tree: the two 1000000-row sections print nothing and took 151-169 s of each ASan run. They now use 200000 rows, and the vertical-merge section setsmin_bytes_for_wide_part = 0so it still merges Wide parts vertically.00223_shard_distributed_aggregation_memory_efficient: the analyzer foldsrandConstant() % 2 ? 5 : 10on the initiator, so both shards always got the same filter, and the 10 repetitions per block never covered shards reading different key sets. Each block now runs the four per-shard combinations once viashardNum(), with exact expected values.No
longtags: that would drop these tests from--no-longjobs. TheTagslines are untouched, so this merges cleanly with #115050.Validation: 50 randomized runs of each test pass on debug and ASan, and the new checks fail when their condition is broken. Under the ThreadFuzzer environment on one machine with the same binary, the per-run time drops 1.6x for
00564under ASan and 2.6-18x for the other three (lower bounds for03173and04073, whose old runs hit the 600 s timeout).Workflow [PR]
Sync PR [sync-upstream/pr/125263]
Version info
26.10.1.2436-master(included in26.10and later)