Skip to content

test: cover IVF rank option isolation and overrides - #31753

Merged
mergify[bot] merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:issue-30414-main
Oct 29, 2026
Merged

mergify[bot] merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:issue-30414-main

Conversation

@iamlinjunhong

@iamlinjunhong iamlinjunhong commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

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

Which issue(s) this PR fixes:

What this PR does / why we need it:

Extend IVF rank option regression coverage for query-level nprobe overrides and session isolation. Two connections exercise distinct session values, a query override, and recovery after invalid options; a small fixture compares POST and FORCE results.

Validation: native libraries and service built on macOS arm64 CPU. The rank-options SQL case passed twice (63/63 each) with the official tester; the vector directory passed with 3362 successful statements and two existing ignored statements. The tester did not compare JDBC metadata. CI remains pending. GPU search was not run, and the original high-dimensional data and queries were unavailable; these results do not guarantee recall on arbitrary data.

Performance: test-only changes; no production runtime impact.

Related 4.2-dev PR: #31754

@mergify mergify Bot added kind/bug Something isn't working kind/test-ci labels Oct 29, 2026
@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Oct 29, 2026
@XuPeng-SH

XuPeng-SH commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 19121a1014607d8546c9305e518b31da194c938b

Review completed. Read the assessment.

@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 →

@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.

mo-bot review · mo-bot-local · review

Commit: 19121a1014607d8546c9305e518b31da194c938b

Assessment: approve

The test-only change adds coherent coverage for IVF query overrides, session isolation and recovery after invalid options. Expected results match the fixture and current implementation. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a1869d-999c-7481-b340-ae4a63e8cee4 · slot 1 · generation 2

Validation:

  • Local static check passed: clean frozen source, patch consistency, whitespace, 63 aligned SQL/result statements and preservation of all 41 existing statements. Retained log: static-check.log; receipt: checks/1793273732353025321-2.json.

  • Reused supplied exact-head successful Compose PROXY and COMPOSE PESSIMISTIC BVT results.

  • Reviewed planner, explain and computed-Boolean metadata owners; saved review-plan.md and complete discussion-assessment.json.

Limitations:

  • No local SQL execution. Raw CI/author reports were unavailable; the author reports two 63/63 case runs and vector-directory success with JDBC metadata comparison disabled.

  • The small CPU fixture does not establish high-dimensional approximate recall or GPU behavior.

@mergify mergify Bot added the queued label Oct 29, 2026
@mergify
mergify Bot merged commit 36d6c79 into matrixorigin:main Oct 29, 2026
23 of 24 checks passed
@mergify

mergify Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

✅ Merged into main as 36d6c79 at 11:37 UTC

Less than a minute in the queue, with no time running CI.

So far

  • ✅ Entered the queue Thu 29 Oct, 11:37 · rule main · triggered by rule Automatic queue on approval for main
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged 11:37 · 36d6c79 · squash
Merge conditions: 3 of 3 met

This pull request

Condition Required by
✅ #review-threads-unresolved = 0 GitHub branch protection
✅ github-review-approved GitHub branch protection

The batch, tested in place

Condition Required by
✅ any of: check-success = CI Required, check-neutral = CI Required, check-skipped = CI Required GitHub branch protection

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot removed the queued label Oct 29, 2026
XuPeng-SH added a commit that referenced this pull request Nov 2, 2026
## 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:

- #30414

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

Support query-level nprobe for IVF rank options, with query override
taking precedence over the session setting and existing fallback.
Propagate the value through planning to IVFFLAT and IVFPQ, and document
tuning, approximate search and GPU prerequisites. Invalid or unknown
rank options now return errors instead of being ignored.

The existing 4.2 AUTO behavior falls back to PRE on an empty result; a
nonempty short page does not trigger fallback. Approximate search can
therefore still return fewer rows or miss neighbors.

Validation: native libraries and service built on macOS arm64 CPU;
parser, planner and protobuf package tests, vet and incremental lint
passed. The rank-options SQL case passed twice (63/63 each), and the
vector directory passed with 1836 successful statements and two existing
ignored statements. The tester did not compare JDBC metadata. CI remains
pending. GPU search was not run, and the original high-dimensional data
and queries were unavailable; these results do not establish recall for
that dataset or arbitrary data.

Performance: option parsing and parameter selection add bounded
per-query work; increasing nprobe can increase search cost. Default
probe behavior is preserved.

Related main PR: #31753

CI repair: selectively backport the fileservice HTTP-trace lifetime fix
from #30472 while preserving the 4.2 interfaces. Each actual HTTP
request owns its trace, and concurrent callbacks synchronize timing
state. This removes the pooled-trace reset race observed in the file
TVF/Hive SQL test, including lazy List and multipart requests.

Repair validation on Linux/amd64, Go 1.26.4: complete fileservice normal
and race tests passed; four directly affected concurrency tests each
passed 100 race repetitions; the exact
`TestSQLFileAccessTenantStageCDC/file_TVF_and_Hive_planning_admission`
regression and its parent cleanup passed under race. Scoped vet and
golangci-lint passed. The in-memory RoundTrip benchmark measured 1.33 us
/ 368 B / 2 allocations unmarked and 3.44 us / 1,344 B / 22 allocations
traced. Fresh GitHub CI remains pending.

The subsequent UT failures were in initial statistics-test connection
setup (HAKeeper ID-allocation timeout before any statistics SQL) and
stale-index fixture cleanup. Both exact tests pass three race
repetitions (`-count=3`, not separate processes) at head `1038d07054`
and at clean 4.2-dev baseline `260678bace0`; their fixtures and native
inputs match. This is bounded attribution evidence, not proof that
HAKeeper availability is fixed.

The stale-index fixture now reports a failed DROP on the owning test and
checks catalog absence after successful cleanup, instead of silently
leaving a database for the next subcase. It retains the existing timeout
and semantic assertions. All four standalone DROP INDEX cells and both
stale-generation sibling tests pass under race with the new cleanup
checks; scoped vet/lint and independent Astra medium review pass. No
statistics timeout or reconnect workaround was added. New-head hosted CI
remains pending.

---------

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

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/bug Something isn't working kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants