Repository navigation
Conversation
…aseline The async-metric observability tests measure a delta against mem_before / procs_before snapshots. Six of the eight subtests call restart_clickhouse() first, so they start from a clean 0/0 baseline. Three did not: test_inflight_executable_invocation_is_visible, test_timed_out_executable_is_killed_and_leaves_metrics, and test_non_udf_shell_commands_are_not_counted. The three preceding pool tests run executable_pool UDFs and never restart afterwards, so they leave idle pool workers (each holding ~128 MiB) registered in the metrics. The no-restart subtests therefore captured mem_before while that residual was live (observed ~275 MiB across three idle workers). Because asynchronous_metrics refresh once per second and idle pool workers are reaped on max_command_execution_time, the residual also shifted during the subtest's own 25 s measurement window: when it stayed, the delta overshot the one-worker band (CI saw +170..187 MiB); when a worker was reaped mid-window, the delta went negative (CI saw -137 MiB). Both are exactly the arm_binary failures in the report. Fix: have the three no-restart subtests restart and wait for the metric to settle, matching the clean 0/0 baseline the other six already establish. This removes the residual contamination without weakening any assertion. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate
Session id: cron:clickhouse-worker-slot-6:20260623-102400 |
|
cc @HanziJiang — could you review this? It fixes the flaky |
|
Workflow [PR], commit [9c7472a] Summary: ✅ AI ReviewSummary
Final Verdict
|
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 405 line(s), 69 function(s) across 127 file(s) · Details Top files
|
|
📊 Cloud Performance Report ✅ AI verdict: This PR changes only an integration test (adding clickhouse restarts for clean memory baselines) and one MongoDB documentation string — nothing in the query execution path. None of these edits can plausibly speed up ClickBench SELECTs, so the flagged improvements on Q15 (-11%), Q18 (-7%), Q28 (-6%), and Q34 (-6%) are run-to-run variance rather than real PR effects, and have been downgraded. No actionable performance change is expected from this PR. clickbenchFlagged queries (5 of 43)
q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
…le-udf-async-metrics-baseline Fix flaky test_executable_udf_async_metrics by resetting the metric baseline
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Fixes the flaky integration test
test_executable_udf_async_metrics, whosesubtests
test_inflight_executable_invocation_is_visibleandtest_timed_out_executable_is_killed_and_leaves_metricsfail on master andacross unrelated PRs (
Integration tests (arm_binary, distributed plan, 3/4)).Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=3dc5a77be297fb233e527e3e09e9f4c7ee53716e&name_0=MasterCI&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%203%2F4%29
The tests added in #107300 measure async-metric deltas against
mem_before/procs_beforesnapshots. Six of the eight subtests callrestart_clickhouse()first, so they start from a clean 0/0 baseline. Three did not.
The three preceding pool tests run
executable_poolUDFs and never restartafterwards, leaving idle pool workers (each ~128 MiB) registered in the metrics.
The no-restart subtests therefore captured
mem_beforewhile that residual waslive (observed ~275 MiB across three idle workers in a local repro). Because
asynchronous_metricsrefresh once per second and idle pool workers are reapedon
max_command_execution_time, the residual also shifted during the subtest'sown 25 s measurement window: when it stayed, the measured delta overshot the
one-worker band (CI saw +170..187 MiB); when a worker was reaped mid-window, the
delta went negative (CI saw -137 MiB). Both match the arm_binary failures.
Fix: have the three no-restart subtests restart and wait for the metric to
settle, matching the clean baseline the other six already establish. No
assertion is weakened.
Verified locally with the master debug binary: the full file passes 8/8 three
times with the fix; a no-restart replica of the in-flight subtest, run after the
residual is established, deterministically falls outside its band
(
mem_before=275 MiB, delta=287.7 MiB).Version info
26.6.1.1166