Skip to content

Commit

Permalink
fix: Fixed BF index overflow issue
Browse files Browse the repository at this point in the history
- Remove ternary expression

Refs: chroma-core#989
  • Loading branch information
tazarov committed Sep 18, 2023
1 parent 62d772f commit ef72512
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions chromadb/segment/impl/vector/local_persistent_hnsw.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,8 @@ def _write_records(self, records: Sequence[EmbeddingRecord]) -> None:
if op == Operation.DELETE:
if exists_in_index:
self._curr_batch.apply(record)
self._brute_force_index.delete(
[record]
) if exists_in_bf_index else None
if exists_in_bf_index:
self._brute_force_index.delete([record])
else:
logger.warning(f"Delete of nonexisting embedding ID: {id}")

Expand Down

0 comments on commit ef72512

Please sign in to comment.