Skip to content
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] Add sync point to test_filtering + fix issues #2388

Merged
merged 8 commits into from
Jun 28, 2024

Conversation

sanketkedia
Copy link
Contributor

@sanketkedia sanketkedia commented Jun 20, 2024

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • Adds sync point to test_filtering
    • Modifies test_filtering in cluster mode to not emit documents/where_clauses of length < 3 and characters "_" and "%"
    • Increases the deadline of tests from 45 secs to 90 secs since waiting for compaction to finish could end up taking longer than 45 secs
    • Fix lte comparison bug with f32 metadata values
    • Fixes version syncing logic to not race with compaction by getting the initial version before the add
    • Suppresses health check warning for filtering too much
    • Fixes replace_block bug in sparse index
    • Fixes split bug in bf writer

Test plan

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

None

@sanketkedia sanketkedia requested a review from HammadB June 20, 2024 21:37
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

chromadb/test/conftest.py Outdated Show resolved Hide resolved
@sanketkedia sanketkedia changed the title [ENH] Add sync point to test_filtering [ENH] Add sync point to test_filtering + fix issues Jun 24, 2024
@sanketkedia sanketkedia merged commit 9f79843 into main Jun 28, 2024
65 checks passed
@@ -168,7 +169,11 @@ impl BlockDelta {
builder: new_delta,
id: Uuid::new_v4(),
};

if first_iter {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to write this without requiring first iter?

@@ -275,14 +275,21 @@ impl<'me, K: ArrowReadableKey<'me> + Into<KeyWrapper>, V: ArrowReadableValue<'me
let target_block_id = self.sparse_index.get_target_block_id(&search_key);
let block = self.get_block(target_block_id).await;
let res = match block {
Some(block) => block.get(prefix, key),
Some(block) => block.get(prefix, key.clone()),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to clone here do we? It wasn't cloning before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants