Repository navigation
Conversation
…s too The performance dashboard classifies a single measurement episode. The in-tree verdict classifies the same query against a bar built from a month of master runs of that exact query: report_thresholds.changed_threshold is ceil(greatest(0.15, 1.5 * p99(abs(diff)) over master, test_threshold), 2), fetched by GET_HISTORICAL_TRESHOLDS_QUERY and joined in compare.sh. The two floors differ by an order of magnitude on chronically noisy micro benchmarks, so the dashboard's highest tier and the job's own "not changed" regularly disagree. Measured on PR ClickHouse#117122's arm 6/6 shard, from that job's own report: of the four dashboard confirmed_regression rows the shard measured, optimize_time_filter_with_preimage ClickHouse#1 has diff 0.229 against a bar of 0.57, timeseries_to_grid_aggregation_functions ClickHouse#3 has 0.261 against 0.91 and ClickHouse#8 has 0.222 against 0.85, while ClickHouse#7 (0.271 against the 0.15 floor) clears its bar. The shard reds on all four. Over the 10.5 h after the gate reached the runners it produced 28 master_head reds across 20 PRs, and 19 of them are shards whose own report published no slower query at all. Require the two judges to agree: a dashboard confirmed_regression blocks only when the same (test, query_index) is also slower in this job's published verdict. read_shard_queries becomes read_shard_confirmed_slowdowns and keeps a client_time row only when diff > changed_threshold and diff >= stat_threshold, which is compare.sh's changed_fail restricted to a slowdown. Both thresholds are already in report/all-query-metrics.tsv, the file the gate reads: compare.sh exports them at fixed trailing positions for exactly this kind of consumer, and the file already retracts the queries the confirmation rerun demoted. So the predicate reproduces the report's own slower set rather than approximating it, in one pass over the file the gate already opens. It does not claim the pairs reproduced on a rerun: that stage is advisory and fail-open, so an absent demotion can also mean it could not be computed. Two consequences of consulting the report first. The dashboard is not queried at all when the shard reported no slower query, which is the common case, and a client_time row that cannot be parsed now raises PerfDashboardError instead of being skipped. The latter turns a corrupt report into a red naming the file rather than a silent green, matching what the code already did when the report carries no client_time row at all. Also restore the > 10 slower count gate for master_head, which the dashboard gate replaced rather than supplemented; it fired twice in the preceding week, and it now applies to local runs too, which never call the dashboard. Verified against the live dashboard API by driving perf_dashboard_gate with the real numbers of both anchor cases. pr-113385's file_table_function ClickHouse#24 (diff 6.342 under its own 10.72 bar, dashboard confirmed_regression with a 96.6% adaptive threshold) goes from blocking to not blocking. pr-120176's tpcds ClickHouse#71, the +2225% regression this gate exists for, keeps blocking; with its bar raised above the measured diff it stops, so the new conjunct is load-bearing. Replayed over all 28 reds, reading each job's own published report: 19 go green, 8 stay red, 1 had its report overwritten by a re-run. Not addressed here: the accountability set is built from this attempt's unseeded random.sample of 10 expanded queries per test, while the dashboard run is keyed pr-<N>-<sha> and merges every attempt, so a re-run whose sample misses a flagged query drops a standing dashboard verdict. Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 2 findings from it, plus 2 from my
Severity: ❌ blocker / Not raised as separate work: #1's gap belongs to the dashboard call this PR inherits, I have only a One check beyond the author's: I re-measured the breadth independently at 2026-09-19 21:00Z over a Session id: cron:clickhouse-review-slot-9:20260919-205400 |
|
Workflow [PR], commit [efa18bc] Summary: ✅
AI ReviewSummaryThis PR tightens the Findings
Tests
Final Verdict |
| @@ -0,0 +1,136 @@ | |||
| """ | |||
There was a problem hiding this comment.
ci/tests/ does not appear in any in-tree PR workflow or job config, so this new file does not currently buy us enforced regression coverage. That matters here because the PR's contract is "stop false reds without hiding real regressions", but after merge neither the new report/dashboard-intersection rule nor the restored > 10 slower floor will actually be exercised by CI.
Can this live under a suite that already runs on PRs, or can a small job be wired to execute it? If you keep it here, it would also be worth adding one case for the restored slower-count branch, since that behavior changes in main as well.
There was a problem hiding this comment.
Confirmed on the wiring: nothing runs ci/tests/. The only mention outside the directory is praktika's __main__ demo in ci/praktika/cache.py, naming a ci/tests/example_1/ that does not exist.
Relocating the file would not close that gap. Praktika selects jobs by a per-job digest, and the stateless one (ci/defs/job_configs.py:172-186) covers ./tests/queries and ./tests/clickhouse-test but not ./ci/jobs/performance_tests.py, so a later PR editing this gate leaves that digest unchanged and the relocated test is served from cache, never run against the edit. The only digest holding this file is the performance job's own (ci/defs/job_configs.py:1614).
Wiring a job is the other option, and that job existed: 8ff3720644b28 removed it by name, together with ci/jobs/ci_tests_job.py and its pull_request.yml entry. Re-adding it is a CI-owner decision rather than part of a perf-gate fix, and I will open it separately if it is wanted. Until then the file keeps the footing the directory has today (#119866 merged this afternoon, #118056 on 2026-09-10, both adding un-wired tests there), runnable exactly the way you ran it, and the description already offers to drop it.
Two last points. It is not the PR's only regression proof: the description carries the replay of the new predicate over the real red jobs, including that #120176's tpcds #71 (+2225%, the regression #120927 was written for) still fails. And I am declining the extra case, because the restored floor is a call into unchanged upstream code (too_many_slow, parse_slower_count, SLOWER_QUERIES_FAIL_THRESHOLD) and my diff only restores the call site #120927 dropped, so one more case in a file nothing executes adds lines rather than protection.
|
Closing in favor of #121847, which takes the threshold-fetch timeout fix and warnings from #121189. Noisy queries are handled in the dashboard's confidence scoring instead: https://github.com/ClickHouse/performance-comparison/pull/5 |
|
Thanks, that is clear, and I am not asking to reopen this. One labelled case, in case it is useful for the dashboard's scoring. On #121137 ( I cannot see ClickHouse/performance-comparison#5, so if it is not deployed yet this is only the baseline to re-check against. |
Related: #120927
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
A
master_headperformance shard now fails on a performance dashboardconfirmed_regressiononly when the shard's own report also reports that query as slower.Description
#120927 made a
master_headshard fail when the performance dashboard classifies any of that shard's slowdowns asconfirmed_regression, and removed the in-tree verdict from the decision. The dashboard classifies a single measurement episode; the in-tree verdict carries a per-query bar built from a month of master runs of that exact query (1.5xthe p99 ofabs(diff),compare.sh:1221). So a chronically noisy micro benchmark reaches the dashboard's highest tier while the job's own report does not call it changed.On #117122 arm 6/6, three of the four dashboard
confirmed_regressionrows that shard measured sit 2.5-3.5x below their own historical bar (diff0.229 vs 0.57, 0.261 vs 0.91, 0.222 vs 0.85); the fourth clears it, and the shard reds on all four. Of the 28 reds in the first 10.5 h, 19 are on shards whose own report published no slower query at all.The fix makes the two judges agree: a
confirmed_regressionblocks only when the same(test, query_index)is also slower in this job's own published verdict, recomputed fromreport/all-query-metrics.tsv, the file the gate already reads and which exportschanged_thresholdfor exactly this purpose. The dashboard is not called when there is no candidate, and a corrupt row fails the check instead of being skipped.pr-120176'stpcds #71+2225% still fails, checked against the live API.It also restores the
> 10 slowerfloor that #120927 dropped frommaster_head(it fired twice in the preceding week); happy to drop those two lines on request. Nothing currently runsci/tests/, so I will remove the new file there on request.Not fixed here: the accountability set comes from this attempt's unseeded 10-query sample while the dashboard run merges every attempt, so a re-run can drop a standing verdict.
Replay over every dashboard-gate red in the window (click to expand)
Each row's in-tree verdict is read from that job's own published
report.html, and intersected with the live dashboard'sconfirmed_regressionset for the shard's arch. 28 rows: 19 go green, 8 stay red, 1 inconclusive (its report was overwritten by a re-run).The 8 that stay red, i.e. where both judges name the same query:
order_by_read_in_order #1optimize_time_filter_with_preimage #6optimize_time_filter_with_preimage #2,#6bitmap_cardinality #1bitmap_cardinality #4timeseries_to_grid_aggregation_functions #7order_by_read_in_order #1In all 19 that go green the dashboard names a query the shard's own report did not publish as slower.
Workflow [PR]
Sync PR [sync-upstream/pr/121090]