Repository navigation
Hash pre-built JSON values in the hashing_serialized_values performance test - #124728
Conversation
…ce test Query ClickHouse#1 cast a String to JSON inside the measured query, so most of its CPU (about 80% in the arm CI profile, 72% on x86 locally) went to the JSON parser rather than to the serializing hash the test exists for. The parse has a per-server-process slow mode, so a slow draw on the tested server read as a hashing regression and turned unrelated PRs red (Performance Comparison on ClickHouse#117318: +15.8%, gone after a server restart). Build the JSON column once at fill time in a Memory table and hash the stored column, single-threaded as before and as in query ClickHouse#2. JSON parsing itself stays measured by new_json_type. 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; 0 findings) plus my own cold review (1 nit).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-11:20261008-200200 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261008-191900 |
|
Workflow [PR], commit [cc3bb2a] Summary: ✅
AI ReviewSummaryThis PR changes Final Verdict
|
Related: #117318
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Query
#1of thehashing_serialized_valuesperformance test now hashesJSONvalues built at fill time instead of casting strings toJSONinside the measured query.Description
Performance Comparison (arm_release, master_head, 5/6)failed on #117318 withhashing_serialized_values#1(+15.8%) as its only blocker (report), although #117318 only changesMergeTreeIndexBloomFilter.cpp. Since 2026-09-25 this query is 10% or more slower on the tested side in about 2% of arm runs, master-vs-master runs included.Query
#1cast aStringtoJSONinside the measured query, so in that job's CPU profile about 80% of its time was the JSON parser and about 12% the hash the test is about. The parse has a per-server-process slow mode: in the same jobsnew_json_type#0, which only parses JSON, moves together with it (r = 0.89 on arm, 0.90 on amd), while#0and#2of this test do not. In the red run the tested server drew it on all 7 runs (1.78-1.88 s vs 1.58 s); after the confirmation restart it ran 1.56-1.57 s.Now the JSON column is built once at fill time in a
Memorytable, and#1hashes the stored column withmax_threads = 1(single-threaded, as before and as#2).#0and#2are unchanged; JSON parsing stays measured bynew_json_type.Validated with the official master release build (amd): under the CPU profiler the old
#1is 72% parse and 26% hash, the new one has no parse samples and 99% hash, at 0.49 s per run.perf.py --stop-mergeson two servers runs the test without errors, every run under 2 s. The slow mode did not appear on my x86 host (old#1p10-p90 spread 1.4% across 24 fresh servers), so the variance drop is for arm CI to confirm.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/124728]
Version info
26.10.1.1975-master(included in26.10and later)