Skip to content

Commit

Permalink
fix: Evict segment only for persisted HNSW
Browse files Browse the repository at this point in the history
  • Loading branch information
tazarov committed Jan 8, 2025
1 parent bbb8495 commit de5b03c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chromadb/segment/impl/manager/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def delete_segments(self, collection_id: UUID) -> Sequence[UUID]:
segments = self._sysdb.get_segments(collection=collection_id)
for segment in segments:
collection_id = segment["collection"]
self._vector_instances_file_handle_cache.evict(collection_id)
if segment["id"] in self._instances:
if segment["type"] == SegmentType.HNSW_LOCAL_PERSISTED.value:
self._vector_instances_file_handle_cache.evict(collection_id)
instance = self.get_segment(collection_id, VectorReader)
instance.delete()
elif segment["type"] == SegmentType.SQLITE.value:
Expand Down

0 comments on commit de5b03c

Please sign in to comment.