Repository navigation
Stabilize apply_patch_parts_join performance test - #105527
Merged
alexey-milovidov merged 1 commit intoMay 23, 2026
Merged
alexey-milovidov merged 1 commit into
alexey-milovidov merged 1 commit into
Conversation
The point-lookup queries (ClickHouse#4-ClickHouse#7) in apply_patch_parts_join produced 18-30% test noise because the four UPDATE statements that build the patch parts ran with default parallelism. Parallel threads racing into the patch builder produce different patch-part split boundaries on every run, which changes how many patch granules a point lookup at id=5000000 ends up reading. Per-server timing then depends on the random split, not on the code being measured. Force INSERT and UPDATE to use a single thread plus a block size large enough to fit each whole patch, so the patch-part layout is the same on every run. Locally verified deterministic over 20 cycles. Setup time goes from ~4.2s to ~6.3s. Scan queries (#0-ClickHouse#3) still detect patch-apply-path regressions as before. Refs ClickHouse#100759.
Contributor
|
Workflow [PR], commit [4b80cd2] Summary: ✅ AI ReviewSummaryThis PR stabilizes Final Verdict
|
This was referenced May 25, 2026
DavidHe-2008
pushed a commit
to DavidHe-2008/ClickHouse
that referenced
this pull request
Jun 1, 2026
…parts-join-flakiness Stabilize apply_patch_parts_join performance test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #100759.
The point-lookup queries (#4-#7) in
apply_patch_parts_joinwere flagged in #100759 as showing 18-30% noise on master runs. Root cause: the four lightweight UPDATE statements run with defaultmax_threads, so parallel threads race into the patch builder and the patch-part split boundary lands at a different row count on every run. The point-lookup queries read a single base granule plus whatever patch granules cover it, so a varying split changesPatchesReadRowsfrom 131072 to 327680 across runs of the same fill, and timings vary correspondingly.Force the INSERT and the four UPDATEs to use a single thread, and set the insert block size large enough that the 10%-update patches stay in one part. Locally verified deterministic
PatchesReadRowsover 20 cycles for all four point-lookup queries. Setup time goes from ~4.2s to ~6.3s. The scan queries (#0-#3) still detect injected regressions in the patch-apply path (verified with a busy-wait at the top ofapplyPatchesToBlock: q0-q3 showed 12-23% slower, p<0.05; q4-q7 remained stable as expected).Changelog category (leave one):
Version info
26.6.1.112