Repository navigation
perf(vector): reduce IVF prefilter scan memory copies - #26989
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.
Re-reviewed exact head 7562bb0. The prior blockers are closed: aliased varlen UnionBatch sources are cloned before mpool growth, with forced-growth self/window regressions; persisted TopN now keeps the cache lease pinned, materializes only selected non-embedding rows, preserves tombstone/prefilter/rowid-distance alignment, and retains the appendable MVCC fallback; temporary LoopJoin diagnostics were removed. I also checked empty/all-null results, cache hit/miss ownership, error cleanup, and area metadata invariants. Focused CGo tests for vector, objectio, objectio/ioutil, and blockio pass. No remaining blocker.
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed exact head 7562bb0 against merge base c04df06.
The prior alias-lifetime blocker is resolved: UnionBatch now clones an overlapping varlen source before destination growth, preserving both header and area backing, and the forced-growth regressions cover self-append, borrowed Window aliases, nulls, and grouping metadata. I also checked the persisted BlockIO TopN path: cache-backed vectors remain scoped to the pinned IOVector, selected rows and distances are the only escaping data, and cache hit/miss, prefilter, tombstone, all-deleted, empty-bound, row-alignment, and appendable-fallback cases are covered. No remaining blocker found.
Merge Queue Status
This pull request spent 1 hour 2 minutes 44 seconds in the queue, including 44 minutes 53 seconds running CI. Required conditions to merge
|
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue #26720 ## What this PR does / why we need it: Backport the fixes missing from `4.2-dev` for [#26720](#26720) and [#25114](#25114). Included PRs: - #26711: Fix pipeline remote batch backpressure - #26739: Retry COS multipart initialization on EOF - #26759: Fix IVF prefilter OOM - #26989: Reduce IVF prefilter scan memory copies - #27156: Keep connections alive after long-running requests The changes address vector-index memory usage, file-service retry behavior, remote pipeline backpressure, and frontend connection lifecycle on `4.2-dev`. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
issue #26720
What this PR does / why we need it:
Summary
embedding blocks
Performance impact
Pyroscope showed the IVF recall workload was CPU-bound in:
runtime.memmoveruntime.memclrNoHeapPointersMustVectorToCachedWithMpool -> Vector.DupLoopJoin -> UnionBatchThe changes remove two major copy-amplification paths:
distances
Validation
UnionBatchfast-path testsupstream/mainhttps://github.com/matrixorigin/mo-nightly-regression/actions/runs/31476056288/job/93738970576