Repository navigation
fix(objectio): recycle merge buffer when streaming spill fails - #31634
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-local · review
Commit: 4fd15aea4c0eff5d32ab07131831b1ef6d71e203
Assessment: approve
The fix preserves merge-buffer ownership on Sink failure, allowing existing cleanup to reclaim it while retaining the original error. Reviewed the complete delta, consumers, regression oracles and discussion; no actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Traced full-block and partial-block failures through both merge algorithms and pool cleanup.
-
Reused supplied frozen-head CI successes for build, UT, SCA, coverage and multi-CN BVT.
-
Static audit passed: source unchanged, exact delta, diff whitespace and complete discussion coverage. Receipt: checks/1793241389758059560-4.json; log: static-audit.log.
-
Saved review-plan.md, review-evidence.md, discussion-assessment.json and validation-summary.json.
Limitations:
- No local Go tests or S3 fault injection performed. Supplied CI statuses lack per-test logs; author baseline and race claims were not independently reproduced.
🚫 Left the queue20 min in the queue, with no time running CI. So far
Reason Pull request #31634 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.
Hint You 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. Merge conditions: 2 of 3 metThis pull request
The batch, tested in place
Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #31622
What this PR does / why we need it:
When a streaming merge spill's file sinker fails, its callback returns a nil buffer.
MergeSortBatchesthen loses the buffer and the Sinker cannot recycle it, leaving its vector allocations charged to the memory pool. Return the buffer along with the error so the existing cleanup path can put it back.Regression tests exercise successful and failed writes with partial and full blocks, using both on-heap and off-heap buffers. The failure cases leak 96 KiB on the base revision and return to their original accounting after the fix.
Validation
go test -p 4 -count=1 ./pkg/objectio/ioutil(passed).git diff --check(passed).