-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: cache v3 index partitions in dataset session #3467
Conversation
Signed-off-by: BubbleCal <bubble-cal@outlook.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3467 +/- ##
==========================================
- Coverage 78.48% 78.46% -0.02%
==========================================
Files 252 252
Lines 94011 94044 +33
Branches 94011 94044 +33
==========================================
+ Hits 73783 73796 +13
- Misses 17232 17252 +20
Partials 2996 2996
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…-index-in-session
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BubbleCal it looks fine to me but I don't have a clear sense of what this patch is supposed to do. Could you update the PR description or commit message with some stuff explaining what v3 index partitions are and what the benefit is? That would be useful to reviewers/future readers.
…-index-in-session
…-index-in-session
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having 3 caches in rust/lance/src/index/cache.rs
is probably better than having 2 caches there and 1 cache in rust/lance/src/index/vector/ivf/v2.rs
.
However, I think we need to convert IndexCache
to be a bytes-based cache soon. Users are running into issues with memory and understanding how much memory is required by the cache. At that point we will need to merge these three caches into one. The VectorIndexCacheEntry
strategy (using as_any
) is probably the best way to do this.
for v3 vector index
before this, we cache the IVF partitions in the IVF struct, which is different from v1, v1 caches all partitions in the global dataset session.
this moves the partition cache to dataset session just like v1 index, so that we can manage all partitions in single cache pool, to better control the total memory usage