Repository navigation
Keep the set of IN in memory in 02844_subquery_timeout_with_break - #126623
Conversation
Since ClickHouse#124907 the test runner randomizes `max_bytes_before_external_set` and `max_bytes_ratio_before_external_set`. When the threshold is below what the set collects before the test's 0.1 s limit, the set goes to disk, and the disk set builder throws `QUERY_WAS_CANCELLED` in the `break` mode by design (`05401_external_set_cancellation`). The test checks the quiet stop of the in-memory set, so clamp both thresholds to 0 for it with `Random settings limits`; every other setting stays random. Failed in "Stateless tests (arm_binary, AsyncInsert, s3 storage, parallel)" on PR ClickHouse#126476 with `--max_bytes_before_external_set 8556090` (127/128 reruns with the same settings failed). 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) and my own cold review (0 findings). Test-only change; nothing to adjudicate. Session id: cron:clickhouse-review-slot-8:20261018-231800 |
|
cc @nihalzp, could you review this and add the |
|
Workflow [PR], commit [406efc9] Summary: ✅ AI ReviewSummaryThis test-only change clamps Final VerdictStatus: ✅ Approve |
2dd86c5
Since ClickHouse#124907 the test runner randomizes max_bytes_before_external_set and max_bytes_ratio_before_external_set. A threshold below the memory of the 1M-key set makes the set spill while it is built, and such a set keeps no explicit elements, so the primary key cannot use it and force_primary_key = 1 throws INDEX_NOT_USED. This is documented (docs/reference/statements/in.mdx: "A set written to disk while it is built cannot be used by the primary key or data skipping indexes"). CI hit it with --max_bytes_before_external_set 29596895. Clamp both thresholds to 0 on the existing Random settings limits line (the runner reads only the first such line); other settings stay random. Same fix as ClickHouse#126623 for 02844_subquery_timeout_with_break. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Backport #126623 to 26.10: Keep the set of `IN` in memory in `02844_subquery_timeout_with_break`
Since ClickHouse#124907 the runner randomizes max_bytes_before_external_set and max_bytes_ratio_before_external_set. A draw below the memory of an IN set (CI: 1215 bytes) makes the set spill while it is built. A spilled set keeps no explicit elements, so KeyCondition does not use it, partition pruning keeps all 3 partitions, and EXPLAIN ESTIMATE reports 3 parts instead of 2 in the "Non-safe cast" section (results stay correct; documented in docs/reference/statements/in.mdx). The LowCardinality, Nullable and LowCardinality(Nullable) set sections lose pruning the same way for a smaller draw. The test checks pruning by the in-memory set, so clamp both thresholds to 0 with a Random settings limits line; every other setting stays random. Same fix as ClickHouse#126681 (00673) and ClickHouse#126623 (02844). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #124907
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
02844_subquery_timeout_with_breakfails withQuery was cancelled before the set of IN was written to disk. (QUERY_WAS_CANCELLED)in Stateless tests (arm_binary, AsyncInsert, s3 storage, parallel) with--max_bytes_before_external_set 8556090(127/128 reruns with the same settings fail).Since #124907 the runner randomizes the spill thresholds of the set of
IN. A threshold below what the set collects in the test's 0.1 s puts the set on disk, and a set on disk throws in thebreakmode by design (05401_external_set_cancellation). The test checks the set that stays in memory, so it now clamps both thresholds to 0 withRandom settings limits; other settings stay random.Validation: with the CI value it fails 20/20, with 0 it passes 50/50; with the runner's draw forced to the CI value it passes 20/20 with the clamp and fails 20/20 without it; 50/50 randomized runs pass.
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/126623]
Version info
26.11.1.281-master(included in26.11and later)26.10.2.29