Repository navigation
Make classification perf test deterministic to reduce noise - #106278
Merged
Algunenano merged 1 commit intoJun 2, 2026
Merged
Conversation
The queries used `LIMIT 10000000` / `LIMIT 500000` without `ORDER BY`, so with parts read by multiple threads each server selected a different set of rows. Because the `detect*` functions' cost depends on the input phrases, the two servers got different workloads and the comparison was frequently reported as `unstable`/`slower`/`faster`. Replace the `LIMIT` with a reproducible `cityHash64(WatchID)` sample, which depends only on the row contents so both servers process the same rows. The modulus keeps roughly the original row counts (`% 10` for the 10M queries, `% 200` for the 500k ones). `detectTonality` scans the whole table and was not affected, so it is left unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [3106271] Summary: ✅
AI ReviewSummaryThis PR makes the noisy Missing context / blind spots
Findings
Tests
Final VerdictStatus: Minimum required action: move the deterministic sample out of the measured |
3 of 11 tasks
pull Bot
pushed a commit
to sowelswl/ClickHouse
that referenced
this pull request
Jun 6, 2026
ClickHouse#106278 tried to remove the LIMIT-without-ORDER-BY non-determinism by sampling with WHERE cityHash64(WatchID) % N = 0. Post-merge master data showed it did not work: it made the measured queries scan the whole table on every run, so instead of reducing the noise it regressed it badly: classification #0: 6.5% -> 76% noisy classification #1: 10% -> 90% noisy (#2/#3/#4 were already clean.) Materialize the deterministic subset once into its own single-part table (single-threaded insert + OPTIMIZE FINAL) and measure over that, so the determinism lives in the setup (like ClickHouse#106249 for reading_from_file) and the measured queries read only the subset instead of rescanning the source.
pull Bot
pushed a commit
to sowelswl/ClickHouse
that referenced
this pull request
Jun 6, 2026
…on-perf-regression Fix classification perf test regression from ClickHouse#106278
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.
classificationis one of the noisy tests tracked in #100759 (classification #1, arm 14% / amd 10%).Root cause is the same as #106249 (
reading_from_file): the queries select a row subset withLIMITand noORDER BY, so when the parts are read by multiple threads each of the two compared servers ends up processing a different set of rows. Because thedetect*functions' cost depends on the input phrases, one server is persistently slower than the other within a run and the verdict flips randomly across runs.Per-run CI data for
classification #1confirms the signature: within each server the runs are stable, but the two servers diverge by up to ~3x (e.g. baseline 3.08s/3.14s vs candidate 9.12s/9.22s on the same master commit), with the slow side alternating.cityHash64(WatchID) % K = 0is a reproducible sample that depends only on row contents, so both servers process exactly the same rows. The modulus keeps roughly the original row counts (% 10for theLIMIT 10000000queries,% 200for theLIMIT 500000ones) and preserves the natural distribution, so the runtime is unchanged.detectTonalityalready scans the whole table and is not affected, so it is left as is.Changelog category (leave one):
Version info
26.6.1.334