Skip to content

Mark 05494_join_hashed_keys as no-msan - #130766

Merged
alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:tag-05494-join-hashed-keys-no-msan
Nov 12, 2026
Merged

alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:tag-05494-join-hashed-keys-no-msan

Conversation

@groeneai

@groeneai groeneai commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #129328
Related: #115050

Changelog category (leave one):

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

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

05494_join_hashed_keys (added by #129328 on 2026-11-11) runs about 190 joins that sweep key shapes, join algorithms, join kinds, FixedString widths and block sizes. Under MSan that takes minutes: its six master runs so far in Stateless tests (amd_msan, parallel, 3/3) average 288.6 s, with a maximum of 401.7 s (master run), against the 600 s per-test timeout. The same test takes about 7 s in release, 5 s in debug, 42 s with ASan and UBSan and 88 s with TSan (medians on master). #115050 marked every functional test averaging over 60 s under MSan as no-msan, before this test existed.

The time is the sanitizer cost of the test's own queries, not one random setting: the 10 randomized runs of the MSan flaky check on the last two heads of #129328 took 66-128 s, and on master the one run placed early in its job took 127 s and the five later ones 230-402 s.

ASan, UBSan, TSan, debug and release keep running it, and in the debug and sanitizer builds HashedJoinKey::buildRange still asserts every batched key against the row-by-row one. The MSan stress jobs ignore no-msan, so they can still run it, and 05508_join_hashed_keys_prefetch (mean 62 s under MSan, at the cutoff) stays under MSan.

Validation: the runner's tag parser reads long, no-msan, and 10 of 10 runs with randomized settings pass on a debug build.

🤖 Generated with Claude Code


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

Version info

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

The test (added by ClickHouse#129328) sweeps key shapes, join algorithms, join kinds,
key widths and block sizes: about 190 joins of a 3,300-row table with a
3,200-row one. On master its six `Stateless tests (amd_msan, parallel, 3/3)`
runs so far average 288.6 s (max 401.7 s, against the 600 s per-test
timeout), while release takes 6.9 s, debug 5.0 s, asan_ubsan 41.8 s and
tsan 87.6 s (p50). That is far over ClickHouse#115050's bar (mean OK duration above
60 s under MSan), which merged before this test existed.

The cost is the sanitizer's, not a random setting: every query pins its
join algorithm, and the duration follows the test's position in the job
(127 s early in a job, 230-402 s late).

ASan, UBSan, TSan, debug and release keep running it, and in every
debug/sanitizer build `HashedJoinKey::buildRange` still asserts each
batched key against the row-by-row one. MSan stress jobs ignore `no-msan`,
and `05508_join_hashed_keys_prefetch` (mean 61.9 s) stays under MSan.

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

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (click to expand)

Second-model review (Gate B) of ba6c584ae94e: 0 findings. Own review: 3 nits, no blocker or major.

Finding Verdict
💡 Description said every query pins its join algorithm; the last block (constant key, empty tuple, correlated, joinGet) does not AGREE, rewritten: the argument now rests on the measured MSan durations
💡 Description said 05508_join_hashed_keys_prefetch keeps MSan coverage of the batched key build; it covers only the String and Tuple(Nullable(String), UInt64) keys AGREE, rewritten: the MSan stress jobs, which ignore no-msan, still run this test
💡 #115050's selection also needs 20 runs; this test has 6 so far AGREE, no change: the description says "six master runs so far", and the fastest of them (127 s) is twice the 60 s cutoff

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? N/A as a failure repro: the problem is cost, not a failure. Measured with #115050's own CIDB query: 6 of 6 master MSan runs took 127-402 s (mean 288.6 s) against the 60 s bar.
b Root cause explained? MSan cost of the test's own ~190 join queries: the 10 randomized runs of the MSan flaky check on the last two heads of #129328 took 66-128 s, and on master the duration follows the test's position in the job (127 s early, 230-402 s late).
c Fix matches root cause? Yes: a sanitizer-keyed tag, the mechanism #115050 applies to every test over 60 s under MSan. A random-settings clamp, a smaller fixture or a lane change would not address an MSan-wide cost.
d Test intent preserved / new tests added? No assertion changed. ASan, UBSan, TSan, debug and release keep running it; debug and sanitizer builds still assert each batched key in HashedJoinKey::buildRange against the row-by-row one. No new test (tag-only change).
e Both directions demonstrated? The runner's tag parser reads long, no-msan after the change and long before it; its no-{build} check skips only msan. 10 of 10 randomized runs pass on a debug build.
f Fix is general across code paths? The sibling 05508_join_hashed_keys_prefetch (mean 62 s under MSan) is at the bar and stays under MSan, and the MSan stress jobs, which ignore no-msan, can still run this test.
g Fix generalizes across inputs (params/datatypes/wrappers)? N/A (test tag only).
h Backward compatible? (maintainer-approved exception only) N/A (no setting, format or code change).
i Invariants and contracts preserved? N/A (no code change).

Session id: cron:clickhouse-impl-slot-6:20261111-105500

@clickhouse-gh

clickhouse-gh Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ba6c584]

Summary: ✅


AI Review

Summary

PR #130766 adds no-msan to 05494_join_hashed_keys to reduce MSan CI runtime. Reviewed head ba6c584ae94e435106464ae2659a76011f319a5a, the complete test, runner tag handling, linked rationale, and all prior discussion. Current master history supports the runtime concern: eight successful ordinary MSan runs average 238.8 seconds, versus 7.3 seconds in the corresponding x86 release job. The existing runner skips only ordinary MSan execution; stress jobs ignore the tag, and other sanitizer jobs retain the unchanged assertions. No actionable findings.

Final Verdict

✅ Approve. No required changes or new inline findings.

@clickhouse-gh clickhouse-gh Bot added pr-ci comp-testing Test content only (no production code). can be tested Allows running workflows for external contributors labels Nov 11, 2026
@alexey-milovidov alexey-milovidov self-assigned this Nov 12, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 12, 2026
Merged via the queue into ClickHouse:master with commit 732256a Nov 12, 2026
551 of 553 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 12, 2026
@clickhouse-gh clickhouse-gh Bot added comp-joins JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla... 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

can be tested Allows running workflows for external contributors comp-joins JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla... 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.

3 participants