Skip to content

Make test 03393_max_merge_delayed_streams_for_parallel_write use a fixed number of columns - #125007

Merged
alexey-milovidov merged 1 commit into
masterfrom
optimize-test-03393-fixed-columns
Oct 11, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
optimize-test-03393-fixed-columns

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

The test 03393_max_merge_delayed_streams_for_parallel_write merged a copy of system.metric_log (1200+ columns, 2212 in a local build, and the number grows with every new metric and event) on an S3 table. It takes 137 s median (up to 245 s) in Stateless tests (arm_asan_ubsan, azure, sequential), which hits its 9000 s timeout: 7 of 22 master runs of that job timed out on 2026-10-09.

Now the table has a fixed number of 200 UInt64 columns. The peak memory usage of the vertical merge is roughly proportional to max_merge_delayed_streams_for_parallel_write: ~25 MiB with the limit of 10 and 220-265 MiB with the limit of 10000, so the threshold is lowered from 1 GB to 100 MB (about 4x above the limited case and 2.2x below the unlimited one). The second OPTIMIZE is kept, because it is the control that shows the merge exceeds the threshold without the limit (otherwise the first check would pass trivially). The adaptive write buffer ALTER is no longer needed, and the tags added for slowness (long, no-parallel, no-flaky-check, no-msan, no-tsan) are removed.

Locally (release build, S3 via MinIO): 58 s before, 2.4-15 s after (8 runs with randomized settings).

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


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

Version info

  • Merged into: 26.10.1.2133-master (included in 26.10 and later)

…fixed number of columns

The test merged a copy of `system.metric_log` on S3. It has 1200+ columns (2212 in a
local build), and the number grows with every new metric and event, so the test kept
getting slower: 137 s median (up to 245 s) in `Stateless tests (arm_asan_ubsan, azure, sequential)`,
which hits its 9000 s timeout.

Use a table with a fixed number of 200 `UInt64` columns instead. The peak memory usage of
the vertical merge is roughly proportional to `max_merge_delayed_streams_for_parallel_write`:
~25 MiB with the limit of 10, and 220-265 MiB with the limit of 10000, so the threshold is
lowered from 1 GB to 100 MB. The second `OPTIMIZE` is kept as a control that the merge
exceeds the threshold without the limit. The adaptive write buffer is disabled from the start
(the INSERT no longer needs it to avoid OOM), and the tags for slowness (`long`, `no-parallel`,
`no-flaky-check`, `no-msan`, `no-tsan`) are removed.

Locally (release build): 58 s before, 2.4-15 s after.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ab2d604]

Summary: ✅


AI Review

Summary

This PR rewrites 03393_max_merge_delayed_streams_for_parallel_write to use a fixed 200-column MergeTree table instead of materializing system.metric_log, lowers the memory threshold to match the smaller synthetic setup, and removes the slowness-related tags that were only needed for the old 1200+ column variant. I did not find any blocker or major issue in the rewritten test: it still exercises the intended contract of max_merge_delayed_streams_for_parallel_write on S3, keeps a control run that must exceed the threshold without the limit, and the Not for changelog metadata matches a test-only change.

Missing context / blind spots
  • ⚠️ I could not run the S3-backed stateless test locally from this checkout because there are no build artifacts in the workspace. The remaining object-storage/sanitizer CI jobs on the PR would close that gap.
Final Verdict

✅ No new findings. From static review, this looks ready once the pending CI jobs finish.

@clickhouse-gh clickhouse-gh Bot added pr-not-for-changelog This PR should not be mentioned in the changelog comp-testing Test content only (no production code). labels Oct 9, 2026
@alexey-milovidov alexey-milovidov added the blocker This issue / pr blocks a new release label Oct 9, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 11, 2026
@alexey-milovidov alexey-milovidov self-assigned this Oct 11, 2026
Merged via the queue into master with commit 4df5343 Oct 11, 2026
163 checks passed
@alexey-milovidov
alexey-milovidov deleted the optimize-test-03393-fixed-columns branch October 11, 2026 18:51
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 11, 2026
@clickhouse-gh clickhouse-gh Bot added comp-merges Merges of data parts: choosing what to merge (merge selectors, merge predicates, part collectors)... and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocker This issue / pr blocks a new release comp-merges Merges of data parts: choosing what to merge (merge selectors, merge predicates, part collectors)... pr-not-for-changelog This PR should not be mentioned in the changelog 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.

2 participants