Skip to content

perf(ivfflat): fuse exact-membership Top-K reads - #28623

Merged
XuPeng-SH merged 9 commits into
matrixorigin:mainfrom
aunjgr:perf/ivfflat-fused-membership-topk-24097
Sep 10, 2026
Merged

XuPeng-SH merged 9 commits into
matrixorigin:mainfrom
aunjgr:perf/ivfflat-fused-membership-topk-24097

Conversation

@aunjgr

@aunjgr aunjgr commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI

Which issue(s) this PR fixes:

Related to #24097
Related to #27854

What this PR does / why we need it:

Fuse persisted exact-membership filtering with vector Top-K under one ObjectIO ownership scope, reuse pinned filter columns for winner output, share object metadata across phases, preserve sparse chunk reads, and materialize only block-local Top-K winners.

Design and validation

  • Design: docs/design/ivf-exact-membership-topk.md (design commit 4af737b)
  • Owning-package tests passed for ObjectIO, readutil, blockio, and IVFFlat after the newest-main merge.
  • Tests cover exact versus approximate admission, empty/sparse/dense selections, transaction tombstones, chunked and legacy vectors, invalid selections, source-key reuse, and empty-domain vector-read avoidance.
  • Full MatrixOne pre-push SCA passed with the repository-declared Go 1.26.4 toolchain.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

…-24097' into perf/ivfflat-fused-membership-topk-24097

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep review completed at exact head e7a5898.

No confirmed production blocker found. Fused and unfused IVFFLAT paths preserve exact-membership filtering, tombstone visibility, candidate/result pairing, Top-K bounds, NULL handling, LIMIT/OFFSET budgeting, and query-vector ownership. No new leak, deadlock, or plugin/CGo compatibility issue was established.

Nonblocking test cleanup issue: pkg/vm/engine/tae/blockio/read_test.go:418 and :451 can exit before output.Clean(queryMP), retaining test allocations on assertion failure. Register cleanup immediately after output construction.

Evidence gaps: direct fused/unfused comparison with native membership filtering, multi-block/tie/NULL/K and LIMIT/OFFSET cases, cancellation and partial-output failure, deterministic proof that persisted fusion executed, before/after benchmarks, and mixed-version/downgrade/restore tests.

Exact-head CI run 34468101999 passed Ubuntu UT, SCA, coverage, and active BVT. Artifacts recorded Membership 28/28, prepared distance ranges 64/64, INCLUDE comparison 15/15, and INCLUDE paths 30/30. Compatibility and Darwin jobs were skipped.

@mergify mergify Bot added the queued label Sep 10, 2026
@mergify

mergify Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-10 12:59 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-09-10 13:12 UTC · at 588f373c1da9d03ffc85c75d4d2f0b53f77a85c4

This pull request spent 12 minutes 16 seconds in the queue, with no time running CI.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Reason

Pull request #28623 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.

The author needs to enable "Allow edits from maintainers" on this pull request.

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.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

@XuPeng-SH
XuPeng-SH merged commit 315502e into matrixorigin:main Sep 10, 2026
26 of 27 checks passed
@mergify mergify Bot added dequeued and removed queued labels Sep 10, 2026
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [x] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI

## Which issue(s) this PR fixes:

Related to matrixorigin#24097
Related to matrixorigin#27854

## What this PR does / why we need it:

Fuse persisted exact-membership filtering with vector Top-K under one
ObjectIO ownership scope, reuse pinned filter columns for winner output,
share object metadata across phases, preserve sparse chunk reads, and
materialize only block-local Top-K winners.

## Design and validation

- Design: docs/design/ivf-exact-membership-topk.md (design commit
4af737b)
- Owning-package tests passed for ObjectIO, readutil, blockio, and
IVFFlat after the newest-main merge.
- Tests cover exact versus approximate admission, empty/sparse/dense
selections, transaction tombstones, chunked and legacy vectors, invalid
selections, source-key reuse, and empty-domain vector-read avoidance.
- Full MatrixOne pre-push SCA passed with the repository-declared Go
1.26.4 toolchain.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [x] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI

## Which issue(s) this PR fixes:

Related to matrixorigin#24097
Related to matrixorigin#27854

## What this PR does / why we need it:

Fuse persisted exact-membership filtering with vector Top-K under one
ObjectIO ownership scope, reuse pinned filter columns for winner output,
share object metadata across phases, preserve sparse chunk reads, and
materialize only block-local Top-K winners.

## Design and validation

- Design: docs/design/ivf-exact-membership-topk.md (design commit
4af737b)
- Owning-package tests passed for ObjectIO, readutil, blockio, and
IVFFlat after the newest-main merge.
- Tests cover exact versus approximate admission, empty/sparse/dense
selections, transaction tombstones, chunked and legacy vectors, invalid
selections, source-key reuse, and empty-domain vector-read avoidance.
- Full MatrixOne pre-push SCA passed with the repository-declared Go
1.26.4 toolchain.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [x] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI

## Which issue(s) this PR fixes:

Related to matrixorigin#24097
Related to matrixorigin#27854

## What this PR does / why we need it:

Fuse persisted exact-membership filtering with vector Top-K under one
ObjectIO ownership scope, reuse pinned filter columns for winner output,
share object metadata across phases, preserve sparse chunk reads, and
materialize only block-local Top-K winners.

## Design and validation

- Design: docs/design/ivf-exact-membership-topk.md (design commit
4af737b)
- Owning-package tests passed for ObjectIO, readutil, blockio, and
IVFFlat after the newest-main merge.
- Tests cover exact versus approximate admission, empty/sparse/dense
selections, transaction tombstones, chunked and legacy vectors, invalid
selections, source-key reuse, and empty-domain vector-read avoidance.
- Full MatrixOne pre-push SCA passed with the repository-declared Go
1.26.4 toolchain.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants