Skip to content

fix(fileservice): remove always-on cache attribution overhead - #30971

Merged
mergify[bot] merged 9 commits into
matrixorigin:mainfrom
aunjgr:fix/cache-attribution-overhead
Oct 23, 2026
Merged

mergify[bot] merged 9 commits into
matrixorigin:mainfrom
aunjgr:fix/cache-attribution-overhead

Conversation

@aunjgr

@aunjgr aunjgr commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Related to #30849 and #30838. This focused correction does not complete the broader optimization issue.

What this PR does / why we need it:

Remove always-on reader, column-construction and cache-admission attribution updates from ordinary reads. Keep cache admission decisions, codec validation, cleanup and reader thresholds unchanged. Preserve atomic HTTP counter reporting and its reset/concurrency tests. Retain the uncompressed/LZ4 constructor benchmark.

Validation: owning-package tests, full pre-push static checks, isolated local TPC-H SF10 Q1–Q22 and separate CPU profiles pass. The baseline is a real clean-main checkout; the candidate contains only this fix, with no source overlays. Six balanced process pairs use three scored calls per query after excluded cold warmups. No slower-query signals were detected across Q1–Q22. Constructor microbenchmarks show no slower signal or allocation increase. Detailed measurements are recorded in the PR comment.

@aunjgr aunjgr added the severity/s0 Active / top priority for current sprint. Owner has committed to working on it now. label Oct 23, 2026
@aunjgr aunjgr self-assigned this Oct 23, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@aunjgr

aunjgr commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Local verification uses only clean main and this candidate, built normally in separate checkouts. No combined candidate or source overlays.

Comparison base: 68fe0510515a4b9a005279c3e2e8d16dc860b5bb. Tested candidate: 06de2ea79d71d1c8d7153f458781f13f08d3f8d4. PR head after the required main merge: f3c89aa2133e8b18f96c96a291df0812ced75de0. GOAMD64=v3, GOEXPERIMENT=simd; matching stamped native generation.

SF10: eight physical CPUs, 16 GiB CN SHARED cache, 32 GiB whole application including the private RAM image, no swap. Existing loaded image reused. Cold selected-query warmups excluded; profiles collected separately. No input/table/schema/row-count/reference/result verification.

Query Baseline median (s) Candidate median (s) Paired change 95% time-ratio interval
Q1 1.5867 1.5844 +0.35% 0.9923–1.0133
Q2 0.0505 0.0509 -2.53% 0.9177–1.0968
Q3 0.4102 0.4081 -1.14% 0.9681–1.0363
Q4 0.3179 0.3091 -2.88% 0.9541–1.0005
Q5 0.3883 0.3794 -2.51% 0.9623–1.0029
Q6 0.2322 0.2420 +2.60% 0.9770–1.1199
Q7 0.3641 0.3575 -1.69% 0.9761–1.0044
Q8 0.3499 0.3504 -0.38% 0.9791–1.0366
Q9 0.7287 0.7188 -1.33% 0.9701–1.0083
Q10 0.5829 0.5853 +1.24% 0.9764–1.0377
Q11 0.0948 0.0962 +1.52% 0.9357–1.0744
Q12 0.4603 0.4467 -2.95% 0.9588–0.9810
Q13 0.3376 0.3409 +1.83% 0.9850–1.0385
Q14 0.2475 0.2446 -1.22% 0.9689–1.0125
Q15 0.4482 0.4521 +0.62% 0.9869–1.0251
Q16 0.1319 0.1321 +0.36% 0.9750–1.0153
Q17 0.3090 0.3016 -2.13% 0.9385–1.0151
Q18 1.2141 1.2003 -1.67% 0.9473–1.0245
Q19 0.6030 0.6089 +1.79% 0.9780–1.0290
Q20 0.3612 0.3674 +1.38% 0.9912–1.0310
Q21 1.4077 1.3893 -1.15% 0.9769–1.0063
Q22 0.1121 0.1110 -0.80% 0.9771–1.0076

Changes use the median of paired process ratios; columns show medians over six process generations. No aggregate gain overrides an individual regression.

Main advanced after timing collection. Its reviewed changes concern JSONLINE import and lock cleanup/shutdown, outside the recorded native read-only TPC-H query paths. The snapshot timing evidence is reused; owning-package tests and full static checks run on the merged PR head.

Environmental exclusions were preserved and whole matched pairs repeated. No performance sample was discarded for being slower.

Package/static checks and separate profile/resource gates passed. Software/source identities, raw timing records and profiles are retained locally; broader optimization issues stay open.

@XuPeng-SH

XuPeng-SH commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · superseded

Commit: d4ca29d4c223bd4fc3b3f3157f7660e5c6a4d917

Review belongs to an older commit; it is not a review of the current head.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head d4ca29d4c223bd4fc3b3f3157f7660e5c6a4d917 against base 5fb586e1429386260b900171f65ffa844f49c981.

The change removes the hot-path attribution updates and their now-unused perfcounter fields/tests, while preserving cache admission/codec behavior, the existing pressure metric, and the core atomic HTTP counter reporting/reset. This is a focused removal of measured diagnostic overhead; it does not claim to complete the broader decoded-cache reuse optimization in #30849/#30838. I found no new correctness issue in the diff.

Validation boundary: the PR comment/body reports owning-package tests, static checks, and an SF10 Q1–Q22 comparison, but these are author-reported. I could not run them locally: this workspace has no MatrixOne checkout or Go runtime. The exact-head combined status is empty; the only visible workflow is unrelated Iceberg Connector E2E.

@mergify mergify Bot added the queued label Oct 23, 2026
@mergify

mergify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-23 13:06 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-10-23 16:08 UTC · at 1da6d7e5d0d2594203b3b3b69504cfc68580d4ec · squash

This pull request spent 3 hours 2 minutes 37 seconds in the queue, including 1 hour 37 minutes 56 seconds running CI.

Required conditions to merge

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rechecked after the 2026-10-23 Mergify synchronization. Current head 16c62d6b87d4aec9188700fdc0072a3182dda624 is 6 commits ahead of current base e3a6ffe27cc74b2c2066a57c6128f35620f8f45e; the PR diff remains the 12-file cache-attribution change. The sync merge adds upstream main changes, but the PR-scoped delta still removes the read-path attribution counters while retaining cache admission/pressure behavior, codec validation and atomic HTTP counter reporting/reset. Static review found no new defect. The prior approval was against an older head. I could not run local tests: this workspace has neither a MatrixOne checkout nor Go. Exact-head combined status has no status checks; the only associated workflow run currently visible is Iceberg Connector E2E in progress, which does not verify this change. Next verification: allow the PR-specific required checks to complete, then rerun the focused fileservice/objectio/perfcounter/readutil tests on this head.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incremental review of the current head 88785c2bffd520df532c2df351d10cc6a5d7b258, rebased onto base 06b8ce7bab7a57003e25c52a45f5712105e71788 after the #30962 merge. The PR-scoped diff remains the 12-file removal of always-on cache attribution updates and their now-unused counters/tests; cache admission, codec validation, pressure metrics, and atomic HTTP counter reporting/reset remain. I found no new issue in the synchronized head. The previous performance evidence is author-reported and is not a fresh run on this synchronized SHA. I could not run local tests here because this workspace has no MatrixOne checkout or Go runtime. Exact-head commit status is empty; the only visible workflow is Iceberg Connector E2E (success), unrelated to these fileservice/objectio paths.

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working severity/s0 Active / top priority for current sprint. Owner has committed to working on it now. size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants