Repository navigation
fix(frontend): release query result metadata batch - #27454
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed exact head 3f8cb75.
saveMeta is the correct owner of the returned metadata batch. objectWriterV1.Write synchronously serializes vectors into writer-owned buffers, so deferring metaBat.Clean after construction safely covers normal completion plus writer construction, Write, WriteEnd, and panic exits without use-after-free or double cleanup. The companion partial-construction cleanup is handled separately by #27455.
Validation:
- Test_saveQueryResultMeta under -race, count=5; passed, including subsequent metadata read/dump.
- full pkg/frontend test suite; passed.
- git diff --check passed and review worktree is clean.
No blocking correctness or lifecycle issue found.
Merge Queue Status
This pull request spent 1 hour 59 minutes 38 seconds in the queue, including 47 minutes 27 seconds running CI. Required conditions to merge
|
Backport #27454 to 4.2-dev. Release the temporary query-result metadata batch after object serialization completes. The writer stores serialized buffers rather than the input batch, so saveMeta retains ownership through every success and writer-error path and can safely clean it on return. The source commit applied cleanly to the newest 4.2-dev tip. Validation: - full pkg/frontend suite Approved by: @XuPeng-SH
Releases the temporary query-result metadata batch after object serialization completes. saveMeta retains ownership of the batch across successful writes and every writer error path; object writing stores serialized buffers, not the input batch. Approved by: @XuPeng-SH
Releases the temporary query-result metadata batch after object serialization completes. saveMeta retains ownership of the batch across successful writes and every writer error path; object writing stores serialized buffers, not the input batch. Approved by: @XuPeng-SH
Releases the temporary query-result metadata batch after object serialization completes. saveMeta retains ownership of the batch across successful writes and every writer error path; object writing stores serialized buffers, not the input batch. Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #27405
What this PR does / why we need it:
Releases the temporary query-result metadata batch after object serialization completes. saveMeta retains ownership of the batch across successful writes and every writer error path; object writing stores serialized buffers, not the input batch.
Tests: