Repository navigation
perf(storage): attribute column cache admission and reconstruction - #30884
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-xupeng · review
Commit: 83075e850d3613553db4ad8c6f6f5844f0872328
Assessment: approve
Reviewed the complete 11-file delta, design, callers, ownership, error paths, concurrency, and tests. The attribution counters preserve existing cache behavior, and HTTP reporting reads live counters atomically. No actionable defect remains.
Model: gpt-6-astra / xhigh
Session: 01a14d34-4e51-79a3-a62d-6c9c16279dc8 · slot 0 · generation 0
Validation:
-
Verified the frozen patch and unchanged source at the assigned HEAD. Preflight and repository native-provenance verification passed.
-
Full perfcounter, objectio, and readutil package tests passed, including all changed tests.
-
The complete perfcounter race suite and 100 concurrent-reporting repetitions passed.
-
Focused cache/constructor race tests, independent concurrent attribution probes, and 42 additional cache/shared-decode tests passed.
-
Sequential constructor controls retained identical allocations: 96 B/op and one allocation. Warm median overhead was 35 ns for uncompressed data and 79 ns for LZ4.
-
Commands, fingerprints, exit receipts, log hashes, and test selections were reconciled in /home/xupeng/.local/state/mo-bot/jobs/b812ebfcf442eac2800cad0d/attempt-1/validation-audit.json; final audit receipt checks/1792704165716470763-3.json exited successfully.
Limitations:
-
The full FileService suite timed out after 240 seconds in TestFuzzingDiskS3 while waiting on fsync. It is not claimed as passing; three opt-in OOM/RSS tests also skipped.
-
Performance checks were standalone constructor controls using CPU release artifacts with SIMSIMD=0, not SQL workload measurements. Author SF10/PMU claims lacked retained raw evidence and were not independently verified.
-
Full linked-issue bodies were absent from the frozen evidence; their broader scope was not inferred beyond the supplied PR and versioned design.
Merge Queue Status
This pull request spent 37 minutes 10 seconds in the queue, with no time running CI. ReasonPull request #30884 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30849; umbrella #30838.
Approved versioned design.
What this PR does / why we need it:
Attribute repeated decoded-column work to reader write bypasses, cache admission decisions and column construction. Add fixed per-codec calls, successful decoded bytes and errors, plus memory-cache update outcomes. Counters aggregate per block, IOVector or column construction and reset with the existing CounterSet. Cache policy, capacity, decoding and ownership remain unchanged.
Make the existing HTML counter reporter load live atomic leaves without copying enclosing containers or reading atomic fields through reflect.IsZero. A concurrent writer/reporter regression test reproduced the old race; the complete perfcounter race suite passes with the fix.
Validation: full perfcounter, fileservice, objectio and readutil package tests; focused cache/constructor race coverage; cold versus hit reconstruction, threshold boundary, policy bypass, every admission rejection stage, codec errors and counter reset tests. Constructor microbenchmarks show ~79 ns extra for an uncompressed 16 KiB column (~8.6%) and ~1.6% for LZ4, with unchanged allocations. This is an attribution step, not a cache-policy optimization.
Comparison protocol: optimized SIMD builds, eight physical CPUs, a private retained SF10 native image, 32 GiB application limit including the image, no swap, and a 16 GiB CN SHARED memory cache verified from running-process metrics. Query cold warmups are excluded; CPU profiling is separate from latency. All query evidence uses main with #30880 merged. No dataset or query-result verification runs in benchmark scripts.
With the effective 16 GiB cache, three warm Q6 calls reconstruct 4.03 GiB in 75,516 LZ4 constructions; memory-cache reads/hits are 87,900/12,384, reader-policy bypasses and FileService policy skips are both 18,879, and no decoded-entry admission attempts or pressure skips occur in the measured window. Cache use is only ~260 MiB. Q10 similarly shows 21,279 reader-policy bypasses, 7.21 GiB reconstructed and ~859 MiB cache use. These counters distinguish policy bypass from insufficient cache capacity; changing that policy is follow-up work.
Separate CPU/PMU diagnostic (one process generation per variant, two warm query calls, excluded from the latency comparison): user instructions per call 18.188G → 18.309G, user cycles 6.476G → 6.406G. The recordings have no lost samples. This single diagnostic pair is not a significance test or a query speedup claim.
Isolated kernel microbenchmarks used the pre-#30880 main snapshot; that cast-only merge does not change the timed constructor, multiplication or SUM kernel closures. The retained-image query comparisons and profiles were rebuilt and rerun with #30880 included.