ivfflat memory escape to heap#23826
Conversation
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by Qodo
WalkthroughsDescription• Fix memory escape to heap in kmeans and brute force index • Use object pools for temporary allocations in vector operations • Replace RAND() with SAMPLE() function for IVF index creation • Remove centroid statistics tracking and small centroid threshold logic • Migrate to math/rand/v2 and use stack-allocated temporary buffers Diagramflowchart LR
A["Memory Allocations"] -->|"Use sync.Pool"| B["Brute Force Index"]
A -->|"Use sync.Pool"| C["Product L2 Operator"]
A -->|"Use malloc allocator"| D["KMeans Clustering"]
E["IVF Index Creation"] -->|"Replace RAND with SAMPLE"| F["Sampling"]
G["IVF Search"] -->|"Remove centroid stats"| H["Simplified Logic"]
I["Random Generation"] -->|"Migrate to math/rand/v2"| J["New RNG API"]
File Changes1. pkg/common/util/unsafe.go
|
Code Review by Qodo
1. Centroid scratch aliases dataset
|
Merge Queue Status
This pull request spent 23 minutes 49 seconds in the queue, with no time running CI. Required conditions to merge
ReasonThe merge conditions cannot be satisfied due to failing checks HintYou may have to fix your CI before adding the pull request to the queue again. |
Merge Queue Status
This pull request spent 21 minutes 58 seconds in the queue, with no time running CI. Required conditions to merge
ReasonThe merge conditions cannot be satisfied due to failing checks HintYou may have to fix your CI before adding the pull request to the queue again. |
Merge Queue Status
This pull request spent 13 seconds in the queue, with no time running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #23712
What this PR does / why we need it: