Repository navigation
fix(pSpool): reuse exact-fit buffers on 4.2-dev - #32752
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? |
|
This pull request is merged. |
|
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-local · review
Commit: 264933a8fe45610074627c5e0ef4f479df14184e
Assessment: approve
The exact-fit fix preserves existing selection, provenance and cleanup mechanisms without adding state. Complete source and regression-oracle review found no actionable defect.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed the complete delta, linked issue, discussion and affected lifecycle consumers; discussion ledger saved.
-
Isolation preflight, patch identity, clean-source verification, gofmt, diff checks and receipt/log reconciliation passed.
-
Author reports baseline controls and successful pSpool, connector and dispatch normal/race runs.
-
Frozen CI records a successful shared MatrixOne build.
Limitations:
-
Focused local tests stopped before compilation because cgo/libmo.so is missing; no local native test binary ran.
-
Raw author runtime logs were unavailable. Relevant hosted tests and Go analysis remain pending, not passes.
-
The scoped allocation improvement does not establish full-CN RSS or OOM reduction.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32751 (P1; the broader memory-amplification tracker remains open).
What this PR does / why we need it:
Accept compatible exact-fit buffers in both pSpool best-fit searches, matching the rule already present in main (#31409). Previously an exact-sized TEXT payload buffer could be assigned to a tiny descriptor request, forcing another payload allocation. A 4 KiB value reproduces the extra 4 KiB allocation on the second copy; the neighboring 4097 B control passes before and after the fix.
The production change is two comparison operators. Bring main's nine selection boundary cases to 4.2-dev and add a small real-Vector reuse regression that checks values, row count, zero post-warmup native allocation, stable retained bytes, and final pool cleanup. Existing provenance/ownership guards and fallback behavior remain in place.
Validation on Linux amd64, CPU-only, Go 1.26.4 with fresh native artifacts:
-count=1), including allocation-failure, consumer completion and abort/cleanup paths. All three packages build.go vet, configured incremental golangci-lint (zero issues), gofmt andgit diff --checkpass.This PR establishes the exact-fit reuse invariant. Whole-batch assignment, mixed-size cache retention and end-to-end CN peak reduction remain follow-up work in #32751; this is not a production OOM or overall RSS-gain claim.