-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[ENH] Sparse Index Reader/Writer Split #2918
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
89642a1
to
91fb57a
Compare
6cf1823
to
a4eb924
Compare
91fb57a
to
052aaf1
Compare
1464d12
to
6fea211
Compare
052aaf1
to
246fb9e
Compare
90dda79
to
d2485d9
Compare
@@ -95,7 +95,7 @@ where | |||
CacheConfig::Unbounded(unbounded_config) => { | |||
Ok(Box::new(UnboundedCache::new(unbounded_config))) | |||
} | |||
CacheConfig::Memory(c) => Ok(c.build_memory().await? as _), | |||
CacheConfig::Memory(c) => Ok(c.build_memory().await?), |
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.
these were needless casts and making clippy angry
@@ -52,9 +52,7 @@ impl ArrowBlockfileWriter { | |||
root_manager: RootManager, | |||
) -> Self { | |||
let initial_block = block_manager.create::<K, V>(); | |||
// TODO: we can update the constructor to take the initial block instead of having a seperate method |
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.
Addressed this TODO
d2485d9
to
6b36165
Compare
/// - `replace_block` - Replace an existing block with a new one | ||
/// - `len` - Get the number of blocks in the sparse index | ||
/// - `is_valid` - Check if the sparse index is valid, useful for debugging and testing | ||
// #[derive(Clone, Serialize, Deserialize)] |
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.
clean this
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.
cleaned in above pr
/// - `len` - Get the number of blocks in the sparse index | ||
/// - `is_valid` - Check if the sparse index is valid, useful for debugging and testing | ||
// #[derive(Clone, Serialize, Deserialize)] | ||
// pub struct SparseIndex { |
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.
nit: cleanup
impl chroma_cache::Weighted for SparseIndex { | ||
fn weight(&self) -> usize { | ||
1 | ||
pub(super) fn get_target_block_id( |
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.
should we add a comment here that it is the caller's responsibility to ensure that the forward
btree is synchronized properly if needed?
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.
this should be internal to the module, its just a helper. i'll address.
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.
Merge activity
|
88c4f89
to
c68a348
Compare
f77b878
to
7f4ba89
Compare
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
Existing tests cover the scope
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
None