Repository navigation
fix(vectorindex): honor CN CPU quota for default threads - #27892
Conversation
Use MatrixOne's effective Go scheduler parallelism instead of the host CPU count for default vector index search/build and ProductL2 centroid assignment. Explicit thread settings remain unchanged. Issue: matrixorigin#27757
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.
Approved at exact head 1468637d35110b2e60db9db11f4697edb28d677a.
I reviewed the complete change map and the production call paths for IVFFlat/HNSW search and build, GPU-tagged consumers, and ProductL2 centroid assignment, including scheduler initialization, explicit thread overrides, nested ProductL2 parallelism, cancellation, resource cleanup, and current-main integration.
The change fixes a concrete concurrency-budget mismatch: ProductL2's outer pipeline parallelism is already capped by MatrixOne's effective scheduler limit, while each clone previously derived its inner native-worker budget from the host-visible runtime.NumCPU(). Defaulting to system.GoMaxProcs() keeps that nested work within the CN's effective quota. Positive user settings remain unchanged, invalid/default non-positive values resolve safely, and the fallback cannot return less than one. No new allocation owner, goroutine lifecycle, blocking edge, logging path, or unbounded state is introduced.
Validation:
- focused
TestGetConcurrencypassed through the repository CGo test wrapper; ./pkg/vectorindexand./pkg/sql/colexec/productl2passed at the exact PR head;- the same owning-package tests and
git diff --checkpassed after applying the commit to currentmain@09c9a0ba9e0b2658a52922e949f1b6add997c477; - PR Linux UT, SCA, coverage, and BVT checks are green.
Non-blocking follow-up: this patch is relevant to the 10M indexed-vector UPDATE path in #27757, but the collected incident diagnostics show cancellation/RPC closure rather than a direct CPU profile or thread-exhaustion signature. The original 10M workload should still be rerun before treating the intermittent connection-stability issue as fully root-caused and closed.
Merge Queue Status
This pull request spent 4 minutes 26 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #27892 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
|
…n#27892) ## 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 matrixorigin#27757 ## What this PR does / why we need it: Use MatrixOne's effective Go scheduler parallelism instead of the host CPU count for default vector index search/build and ProductL2 centroid assignment. Explicit thread settings remain unchanged. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…n#27892) ## 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 matrixorigin#27757 ## What this PR does / why we need it: Use MatrixOne's effective Go scheduler parallelism instead of the host CPU count for default vector index search/build and ProductL2 centroid assignment. Explicit thread settings remain unchanged. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…n#27892) ## 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 matrixorigin#27757 ## What this PR does / why we need it: Use MatrixOne's effective Go scheduler parallelism instead of the host CPU count for default vector index search/build and ProductL2 centroid assignment. Explicit thread settings remain unchanged. 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 #27757
What this PR does / why we need it:
Use MatrixOne's effective Go scheduler parallelism instead of the host CPU count for default vector index search/build and ProductL2 centroid assignment. Explicit thread settings remain unchanged.