Repository navigation
test: release lazy cache read vector - #27147
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.
Deep review completed on exact head 8c3c757.
Q1 ownership: each successful lazy-cache Read/ReadCache test vector now has one effective Release owner. Release is also safe after an error because IOEntry error cleanup clears transferred deallocator ownership. The eviction helper clones Data before its deferred Release, so no returned slice aliases freed allocator memory. The WriterForRead case still allocates a local-read scratch buffer and is correctly covered by cacheVec.Release().
Q2/Q3: this test-only change introduces no new wait dependency or accumulating state.
Local verification passed:
- MO_MALLOC_DEBUG=1 focused affected tests
- MO_MALLOC_DEBUG=1 full ./pkg/tools/toolfs/... tests
- GOWORK=off go list/build/vet ./pkg/tools/toolfs/...
No blocking issue found.
Merge Queue Status
This pull request spent 1 hour 19 minutes 5 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #27147 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.
Failing checks:
HintYou 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. Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27145 ## What this PR does / why we need it: Release every allocator-backed IOVector returned by successful lazy-cache reads in the affected tests, including the WriterForRead path. The eviction helper clones returned data before releasing its vector so callers never retain allocator-owned memory. This closes the reproducible 3-byte, 10-byte, 24-byte, and 27-byte checked-allocator leaks without changing production FileService ownership semantics. Validation: - MO_MALLOC_DEBUG=1 focused tests for all affected read paths - MO_MALLOC_DEBUG=1 full pkg/tools/toolfs/... test suite - go list/build/vet ./pkg/tools/toolfs/... --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27145 ## What this PR does / why we need it: Release every allocator-backed IOVector returned by successful lazy-cache reads in the affected tests, including the WriterForRead path. The eviction helper clones returned data before releasing its vector so callers never retain allocator-owned memory. This closes the reproducible 3-byte, 10-byte, 24-byte, and 27-byte checked-allocator leaks without changing production FileService ownership semantics. Validation: - MO_MALLOC_DEBUG=1 focused tests for all affected read paths - MO_MALLOC_DEBUG=1 full pkg/tools/toolfs/... test suite - go list/build/vet ./pkg/tools/toolfs/... --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27145 ## What this PR does / why we need it: Release every allocator-backed IOVector returned by successful lazy-cache reads in the affected tests, including the WriterForRead path. The eviction helper clones returned data before releasing its vector so callers never retain allocator-owned memory. This closes the reproducible 3-byte, 10-byte, 24-byte, and 27-byte checked-allocator leaks without changing production FileService ownership semantics. Validation: - MO_MALLOC_DEBUG=1 focused tests for all affected read paths - MO_MALLOC_DEBUG=1 full pkg/tools/toolfs/... test suite - go list/build/vet ./pkg/tools/toolfs/... --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #27145
What this PR does / why we need it:
Release every allocator-backed IOVector returned by successful lazy-cache reads in the affected tests, including the WriterForRead path. The eviction helper clones returned data before releasing its vector so callers never retain allocator-owned memory. This closes the reproducible 3-byte, 10-byte, 24-byte, and 27-byte checked-allocator leaks without changing production FileService ownership semantics.
Validation: