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 af0a8d8 commit 4435b8d
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 @@ -156,9 +156,9 @@ def prepare_segments_for_new_collection(
def delete_segments(self, segments: Sequence[Segment]) -> Sequence[UUID]:
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 4435b8d

Please sign in to comment.