fix: persist vector deletion

This commit is contained in:
George Panchuk
2026-05-08 00:22:50 +07:00
parent 159270e495
commit 6f84d5fea7

View File

@@ -2910,6 +2910,8 @@ class LocalCollection:
"Cannot delete the unnamed vector when it is the only dense vector in the collection"
)
affected_mask = ~self.deleted_per_vector.get(vector_name, np.ones(0, dtype=bool))
self._all_vectors_keys.remove(vector_name)
self.deleted_per_vector.pop(vector_name, None)
@@ -2930,6 +2932,11 @@ class LocalCollection:
if isinstance(self.config.vectors, dict):
self.config.vectors.pop(vector_name, None)
if self.storage is not None:
for idx, point_id in enumerate(self.ids_inv):
if affected_mask[idx] and not self.deleted[idx]:
self._persist_by_id(point_id)
def info(self) -> models.CollectionInfo:
return models.CollectionInfo(
status=models.CollectionStatus.GREEN,