Repository navigation
feat: add LRU eviction to CollectionTsCache and cache capacity controls - #644
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yhmo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
This pull request is merged. |
658a691 to
133ac85
Compare
133ac85 to
641e723
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #644 +/- ##
===========================================
+ Coverage 53.47% 89.47% +36.00%
===========================================
Files 52 451 +399
Lines 4432 18989 +14557
Branches 0 2114 +2114
===========================================
+ Hits 2370 16991 +14621
+ Misses 2062 1995 -67
- Partials 0 3 +3
🚀 New features to boost your workflow:
|
Review summaryOverall this is a coherent, well-tested change: CollectionTsCache becomes a bounded LRU (default 4096, mirroring pymilvus's CacheRegion.DEFAULT_CAPACITY), SchemaCache gains runtime capacity controls, and the new Two Low, non-blocking notes were posted inline:
|
641e723 to
a9f43a9
Compare
a9f43a9 to
ddb4339
Compare
ddb4339 to
b09e805
Compare
b09e805 to
f4e2a2e
Compare
b1769a3 to
10189e0
Compare
10189e0 to
8af3d21
Compare
8af3d21 to
144d46b
Compare
1f38c19 to
5eb730d
Compare
5eb730d to
f1e2f87
Compare
f1e2f87 to
141b245
Compare
yhmo
left a comment
There was a problem hiding this comment.
Finalizing the pending review that carries the resolved PR-description naming thread so new review comments can be posted.
141b245 to
b2566cc
Compare
Signed-off-by: yhmo <yihua.mo@zilliz.com>
b2566cc to
bfc34e5
Compare
Make the collection timestamp cache a bounded LRU (default 4096, matching pymilvus) and expose a single API to tune both in-process cache capacities.
CollectionTsCacheis now a size-bounded LRU: default capacity 4096 (sharedkCollectionCacheDefaultCapacityconstant withSchemaCache), constructor capacity,SetCapacity/Capacity, recency tracking on get/set, and LRU eviction when full (Move/Copy transfer too).SchemaCachegainsSetCapacity/Capacityso the bound can change at runtime; shrinking evicts immediately.milvus/utils/CacheConfig.hwithCacheConfig::SetCapacity(size_t)setting both cache bounds under a shared lock andCacheConfig::GetCapacity()reading the schema cache capacity (0 is rejected withINVALID_ARGUMENT).CacheConfig.handFP16.hare now exposed through the aggregateMilvusClientV2.h.TestCacheConfig.cppfor the public API, TsCache LRU-eviction/shrink/transfer-at-capacity/concurrent-set-get tests, SchemaCache shrink test; the former no-limitDoesNotEvictSessionTimestampscase now asserts LRU behavior.Verified: full ut suite passes, clang-format clean.