-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Evict other versions of hnsw index of the collection when anoth…
…er version is fetched (#2707) ## Description of changes *Summarize the changes made by this PR.* It was seen that query nodes OOM in load tests. One area where we could optimize the memory footprint is the HNSW index cache. This PR restricts the cache to keep one entry per collection. Ideally, we would like the index version of this entry to be of the latest but there is no guarantee with this PR. Once the versioning changes land, we could improve this. For e.g. one bad case could be: For the same collection: 1. get index version v1 2. get index version v2 (> v1) 3. get index version v1 (can happen due to an inflight query that started before compaction of v2 occured) -- this will evict v2 even though it is more recent and will be used again in future ## Test plan - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes None
- Loading branch information
1 parent
003bf67
commit 9661326
Showing
2 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters