Skip to content

Fix flaky 04625_hash_table_sizes_stats_table_expression_modifiers under tiny index_granularity - #126168

Merged
alexey-milovidov merged 2 commits into
masterfrom
fix-flaky-04625-index-granularity
Oct 20, 2026
Merged

alexey-milovidov merged 2 commits into
masterfrom
fix-flaky-04625-index-granularity

Conversation

@alexey-milovidov

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

Copy link
Copy Markdown
Member

04625_hash_table_sizes_stats_table_expression_modifiers timed out on master and in PRs in Stateless tests (arm_binary, ParallelReplicas, s3 storage, parallel). In both recent failures the randomized MergeTree settings had a tiny index_granularity (12 and 15) with compact parts, which splits the 1.3M-row table into ~108k marks. The FINAL query reads them in order with max_threads = 1, and on S3 storage a single run took ~300 seconds according to the server log (Read 1300000 rows, 19.84 MiB in 304.531 sec.). The second, sequential FINAL run (-prealloc) then went past the 600-second test timeout.

The fix pins index_granularity = 8192 on the test table. The test checks the hash-table-stats cache key, so the granularity does not matter to it. Everything else stays randomized.

CI reports:

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

🤖 Generated with Claude Code


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

Version info

  • Merged into: 26.11.1.300-master (included in 26.11 and later)

…nder tiny `index_granularity`

The randomized `index_granularity` (12 and 15 in the two recent failures, with compact parts)
splits the 1.3M-row table into ~108k marks. `FINAL` reads them in order with `max_threads = 1`,
and on the `s3 storage` jobs a single `FINAL` query took ~300 seconds, so the two sequential
`FINAL` runs of the test exceeded the 600-second timeout. Pin `index_granularity = 8192` on the
table; the test is about the hash-table-stats cache key, not about the granularity.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=0f5adf1798a2c76704782ffad07be13b07c8daf8&name_0=MasterCI&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=110015&sha=a0b66847374b034e088d66125cdf48204dfc2de3&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29
PR: #110015

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

clickhouse-gh Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [be906f1]

Summary: ✅


AI Review

Summary

PR #126168 pins index_granularity = 8192 for the test table to avoid excessive mark reads with randomized tiny granules. The existing FINAL and non-FINAL cache-key assertions remain intact. No actionable findings. The modified test passed in 0.64 seconds in Fast test at the reviewed head.

Missing context / blind spots
  • ⚠️ The S3/parallel-replica stateless job has no results yet for head be906f15533ecbd9378e9f78b2372de019b130d3. A completed run would confirm the timeout fix in the originally affected configuration. No local ClickHouse tests were run.
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-ci comp-testing Test content only (no production code). labels Oct 16, 2026
@alexey-milovidov alexey-milovidov self-assigned this Oct 18, 2026

@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.

Ok.

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 20, 2026
Merged via the queue into master with commit 19f75f4 Oct 20, 2026
179 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-flaky-04625-index-granularity branch October 20, 2026 12:32
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 20, 2026
@clickhouse-gh clickhouse-gh Bot added comp-aggregation GROUP BY / aggregation framework (hash tables, spilling, external aggregation). 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

comp-aggregation GROUP BY / aggregation framework (hash tables, spilling, external aggregation). pr-ci 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