Repository navigation
Release merge spill buffers on panic - #32160
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: a0b98b53e872b61c947ef65fd2824de13b93b912
Assessment: approve
The merge spill fix keeps one owner for every current, accumulated, or queued batch and releases locally owned buffers during synchronous panic unwinding. It reuses the existing freelist and pipeline ownership rules without adding a lifecycle mechanism. The complete delta, linked issue, discussion, source consumers, and regression oracles are closed with no actionable findings.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Reviewed all three changed files, MergeSortBatches overlap/disjoint paths, freelist, SinkPool submission/cleanup, writer arena, reset and Close; reconciled both discussion keys and linked issue #32156.
-
Normal and race short suites with matrixone_test tags passed: 75 ioutil and 14 mergeutil root tests per run, including all nine changed/new roots. Commands, frozen-source fingerprints, exits and log hashes are matched in validation-audit.json.
-
Three exact race roots passed 100 repetitions each: TestMergeSpillResetKeepsNewData, TestPipelineProducerPanicAfterWorkerTakesBatch, and TestMergeSpillReplacementOwnedOnPanic; counts derive from the measured race durations.
-
An owner-only merge-base overlay failed all four streaming panic cases with 98,304 retained bytes while its eight success/error cases passed; the current owner passes all twelve cases. This is an expected negative control, not a candidate failure.
-
Local go vet, formatting and diff whitespace checks passed. Private-runtime preflight and fresh source-pinned native prerequisites passed; retained setup failures were recovered before completed test runs.
-
Supplied exact-head CI reports successful UT, static analysis, coverage, shared build and multi-CN BVT checks; skipped and neutral checks were not counted as passes.
Limitations:
-
Validation establishes component ownership and synchronous panic cleanup; no real oversized-allocation or deployed OOM reproduction was attempted.
-
Asynchronous worker panic recovery is unchanged and outside this fix's claimed behavior. Broader CI conclusions use the supplied snapshot rather than independently downloaded CI logs.
❌ Left the queue · checks failed2 h 32 min in the queue, with no time running CI. So far
The failure is in this pull request. It failed tested alone on top of Reason The merge conditions cannot be satisfied due to failing checks
To get back in the queue
Merge conditions not met when it left the queue
Requeue requested — the merge queue status continues in this comment ↓. 2 merge conditions met
Times in UTC · dashboard · how the merge queue works |
Cover errors and panics in the trailing merge batch for overlapping and disjoint key ranges. Use typed batch allocation and the matching freelist interface for the spill ownership regressions. Co-authored-by: XuPeng-SH <[email protected]> Signed-off-by: XuPeng-SH <[email protected]>
e72ca71 to
e6ca0cc
Compare
🚫 Left the queue · pull request dequeued39 min in the queue, with no time running CI. So far
Reason Pull request #32160 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.
To get back in the queue
Merge conditions not met when it left the queue
Tick the box to put this pull request back in the merge queue (same as
2 merge conditions met
Times in UTC · dashboard · how the merge queue works |
…dbf516fbd8740aee75da7748563ea758ccabce9
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
A merge spill can leave its current output buffer owned by nobody when a sink or buffer allocation panics, retaining memory after the sinker closes. Track ownership through the streaming, accumulate, and pipeline paths so that errors and panics return each buffer exactly once while preserving the original error or panic.
Validation on the reviewed commit:
e72ca7101584. The Coverage jobs stopped after HTTP 403 responses from the worker metadata API in run 46104447855.e75a4d2ca470with the same three-file patch. One6ca0ccd1810,mo-cgo-test -short -race -tags matrixone_test -p 1 -count=1 ./pkg/objectio/ioutil ./pkg/objectio/mergeutilpassed on Darwin/arm64. Formatting and PR artifact checks passed. Linux/x64 and Coverage on this revision are pending CI.The change adds fixed-cost cleanup and ownership bookkeeping without changing the merge algorithm or batch sizes. It does not claim to reproduce a deployed OOM or an actual oversized allocation; asynchronous worker panics retain their existing behavior.