Repository navigation
Conversation
ProfileEvents['MemoryAllocatedWithoutCheckBytes'] counts a thread's deferred allocations when they are flushed, and only for flushes triggered by an allocation that skips the limit check. With max_untracked_memory = 1Mi a thread also flushes when the per-CPU untracked budget (max_per_cpu_untracked_memory, shared by every thread on that CPU) runs out, so which allocation triggers a flush, and therefore the reading of an identical query, depends on the neighbours. Measured on a debug build with the CI test configuration: the no-dots query reads 17937304 bytes when idle and 13198360 bytes with 16 client loops on the server's two CPUs. Every CI failure since 2026-11-15 shows the dotted query at ~17.9 MB and the control at ~11.4 MB; min() over three runs keeps the low control reading. Read system.query_log.memory_usage with --max_untracked_memory 0 instead, the idiom of 04072_columns_cache_memory_usage: every allocation and free then reaches the query's tracker at once, so the peak depends on the query alone. Post-fix ratio 1.0000 on debug and ASAN when idle, with max_per_cpu_untracked_memory = 1 and under load. With the pre-ClickHouse#113289 matcher restored the dotted query peaks at 2.61x-2.74x the control on every table. CI reports: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=b92770f43d1a3ca2d4878eb819158dac9d9f6300&name_0=MasterCI https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=2f06a797f107f1ed0ce1b38819d86c4a72329e86&name_0=MasterCI https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=129081&sha=eee40ead1c9a9ad89b2b213819ee4e40ee84730c&name_0=PR https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=131814&sha=22109b852152744c53fb91a21bb401b4654c1f50&name_0=PR Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 1 finding), plus one nit from my own review.
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-10:20261118-213300 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261118-200001 |
|
Workflow [PR], commit [5647133] Summary: ✅ AI ReviewSummaryThis PR stabilizes Missing context / blind spots
Final VerdictStatus: ✅ Approve |
Related: #113003
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Make the test
04780_json_subcolumn_index_match_not_quadraticmeasure the peak memory of its queries, so neighbouring load no longer makes it fail.Description
Since 2026-11-15 the 150% bound fires on jemalloc builds (2 master runs, 2 PR runs, reports below), each time with the no-dots control 34-37% below the dotted query (on amd_debug and amd_release ~11.4 MB against the dotted query's normal ~17.9 MB). Reruns pass.
ProfileEvents['MemoryAllocatedWithoutCheckBytes']counts a thread's deferred allocations when they are flushed, and only when the allocation that triggers the flush skips the limit check. Withmax_untracked_memory = 1Mi(the test configuration) a thread also flushes when the per-CPU untracked budget, shared by every thread on that CPU, runs out. So the reading of the same query depends on its neighbours: on a debug build with the CI test configuration, the control read 17,937,304 bytes when idle and 13,198,360 bytes with 16 client loops on the server's two CPUs.min()over the three runs keeps a low control reading.The test now reads
memory_usage(the query's peak) with--max_untracked_memory 0, as04072_columns_cache_memory_usagedoes: every allocation and free reaches the query's tracker at once, so the peak depends on the query only. The three runs, the 150% bound and the four tables are unchanged.Validated on master debug and ASAN builds with the CI test configuration: ratio 1.0000 on every table when idle, with
max_per_cpu_untracked_memory = 1, and under load (30/30 runs under load on each build, 50/50 randomized runs). With the pre-#113289 matcher restored, the dotted query peaks at 2.61x-2.74x the control on every table and the test fails.Reports:
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/132825]