Repository navigation
Clamp random granularity in test 05020_top_k_through_array_join_explain - #128015
Conversation
The test inserts 100 rows into a MergeTree table and asserts the full `EXPLAIN PLAN` text, including `Parts: 1 | Granules: 1` of every `ReadFromMergeTree` step. The runner randomizes `index_granularity` (1..65536) and `index_granularity_bytes` (1 KiB..30 MiB), and only raises their floors to 100 rows / 100 KiB on debug, sanitizer and coverage builds. On a release-flavour job a draw below 67 rows (any part type), below 100 rows on a wide part, or below ~2.7 KB of bytes splits the part into several granules, so the reference diffs on every read step (`Granules: 3` with `index_granularity = 37` on arm_binary). Add the same `Random settings limits` line 20 other tests carry: both settings stay randomized above 100 rows / 100000 bytes, which keeps the single 100-row part in one granule. The reference is unchanged. 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; 1 full pass), plus my own cold review (0 blocker, 0 major). Cross-checked against the code: one mark at the floor for both part types ( Session id: cron:clickhouse-review-slot-9:20261027-234900 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261027-233200 |
|
cc @yariks5s, could you review this and add the |
|
Workflow [PR], commit [9a6cef3] Summary: ✅ AI ReviewSummaryThe PR stabilizes Final VerdictStatus: ✅ Approve |
CI finish ledger - 6e31cc4Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
All five stateless flaky check builds passed on this head, and Session id: cron:our-pr-ci-monitor:20261028-170007 |
Cherry pick #128015 to 26.10: Clamp random granularity in test `05020_top_k_through_array_join_explain`
…p_k_through_array_join_explain`
Related: #116550
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The test
05020_top_k_through_array_join_explainnow keeps the randomizedindex_granularityandindex_granularity_bytesat 100 rows / 100000 bytes or above, so its single 100-row part always has one granule.Description
The test was added by #116550. Failing job: Stateless tests (arm_binary, parallel): every
ReadFromMergeTreestep printsParts: 1 | Granules: 3instead ofGranules: 1. The runner's own diagnosis isolatedindex_granularity = 37(359/359 fail with the drawn settings, 0/383 without).The test inserts 100 rows and asserts the full
EXPLAINtext. The runner raises the granularity floors to 100 rows / 100 KiB only on debug, sanitizer and coverage builds, so on release-flavour jobs a draw below 67 rows (below 100 on a wide part, since compact parts fold a short tail into the previous granule) or below ~2.7 KB ofindex_granularity_bytessplits the part.The fix adds
-- Random settings limits: index_granularity=(100, None); index_granularity_bytes=(100000, None), the same line 20 other tests carry. Both settings stay randomized above the floors; the queries and the reference are unchanged.Validation (debug build, runner copy forcing the draw after the floor):
index_granularity1..66: 20/20 fail before, 20/20 pass after (logged value 100 every run); 67..99: fails exactly on the wide-part draws;index_granularity_bytes1024..2048: 20/20 fail before, 20/20 pass after (logged 100000);🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/128015]
Version info
26.11.1.1292-master(included in26.11and later)