fix(qdrant): actually clear points on reset() for local Qdrant (#6412)
Co-authored-by: freya0926 <299410795+freya0926@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
This commit is contained in:
co-authored by
freya0926
Claude Opus 4.8
kartik-mem0
parent
39551145b8
commit
8005e18aec
@@ -596,3 +596,11 @@ class Qdrant(VectorStoreBase):
|
||||
logger.warning(f"Resetting index {self.collection_name}...")
|
||||
self.delete_col()
|
||||
self.create_col(self.embedding_model_dims, self.on_disk)
|
||||
if self.is_local:
|
||||
# Local delete_collection() rmtree's with ignore_errors=True and leaves its
|
||||
# sqlite handle open, so where an open file blocks unlink (Windows, NFS) the
|
||||
# recreated collection re-adopts the old storage.sqlite. Drop what survived.
|
||||
self.client.delete(
|
||||
collection_name=self.collection_name,
|
||||
points_selector=models.FilterSelector(filter=models.Filter(must=[])),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user