{"record":{"id":"ff3de3d498ba370e","repo":"microsoft/semantic-kernel","slug":"delete-failed","errorCode":null,"errorMessage":"Delete failed","messagePattern":"Delete failed","errorType":"exception","errorClass":"ServiceResponseException","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/connectors/memory_stores/qdrant/qdrant_memory_store.py","lineNumber":176,"sourceCode":"                    key=key,\n                    with_embedding=with_embeddings,\n                )\n            )\n        return await asyncio.gather(*tasks)\n\n    @override\n    async def remove(self, collection_name: str, key: str) -> None:\n        existing_record = await self._get_existing_record_by_payload_id(\n            collection_name=collection_name,\n            payload_id=key,\n            with_embedding=False,\n        )\n\n        if existing_record:\n            pointId = existing_record.id\n            result = self._qdrantclient.delete(collection_name=collection_name, points_selector=[pointId])\n            if result.status != qdrant_models.UpdateStatus.COMPLETED:\n                raise ServiceResponseException(\"Delete failed\")\n\n    @override\n    async def remove_batch(self, collection_name: str, keys: list[str]) -> None:\n        tasks = []\n        for key in keys:\n            tasks.append(\n                self._get_existing_record_by_payload_id(\n                    collection_name=collection_name,\n                    payload_id=key,\n                    with_embedding=False,\n                )\n            )\n\n        existing_records = await asyncio.gather(*tasks)\n\n        if len(existing_records) > 0:\n            result = self._qdrantclient.delete(\n                collection_name=collection_name,","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/connectors/memory_stores/qdrant/qdrant_memory_store.py#L158-L194","documentation":"Raised by QdrantMemoryStore.remove() when the point delete returns a status other than UpdateStatus.COMPLETED. The method first looks up the existing record by payload id; only if found does it call delete and check status. ServiceResponseException with message 'Delete failed'.","triggerScenarios":"Calling `await store.remove(collection_name, key)` where the located point's delete operation is acknowledged but not completed within the wait window.","commonSituations":"Client not configured to wait; deletion under heavy write load; transient cluster issues; the point was found but concurrently removed.","solutions":["Retry remove() with backoff for transient non-COMPLETED statuses.","Configure QdrantClient for synchronous confirmation.","Catch ServiceResponseException and verify removal via a follow-up get().","Confirm collection health/replica state if deletes persistently fail."],"exampleFix":"// before\nawait store.remove('mycol', key)\n// after\ntry:\n    await store.remove('mycol', key)\nexcept ServiceResponseException:\n    if await store.get('mycol', key) is None:\n        pass  # effectively deleted\n    else:\n        raise","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await store.remove(collection_name, key)\nexcept ServiceResponseException:\n    if await store.get(collection_name, key) is None:\n        pass  # effectively gone\n    else:\n        raise","preventionTips":["Treat non-COMPLETED delete as retryable; verify with a follow-up get().","Configure QdrantClient to wait for completion.","Watch cluster health if deletes fail repeatedly."],"tags":["qdrant","memory-store","delete","service-response-exception","retry"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}