Skip to content

Commit

Permalink
[BUG] HNSW index initialized with wrong id (#2158)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Fix a bug where the hnsw index is initalized incorrectly
 - New functionality
	 - None

## Test plan
*How are these changes tested?*
Adds a basic test for the bugfixed case
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
  • Loading branch information
HammadB authored May 8, 2024
1 parent 5f9f763 commit bde6ac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/worker/src/index/hnsw_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl HnswIndexProvider {
}
};

match HnswIndex::load(storage_path_str, &index_config, *source_id) {
match HnswIndex::load(storage_path_str, &index_config, new_id) {
Ok(index) => {
let index = Arc::new(RwLock::new(index));
let mut cache = self.cache.write();
Expand Down

0 comments on commit bde6ac9

Please sign in to comment.