microsoft/semantic-kernel · error · ServiceResponseException
Delete failed
Error message
Delete failed
What it means
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'.
Source
Thrown at python/semantic_kernel/connectors/memory_stores/qdrant/qdrant_memory_store.py:176
key=key,
with_embedding=with_embeddings,
)
)
return await asyncio.gather(*tasks)
@override
async def remove(self, collection_name: str, key: str) -> None:
existing_record = await self._get_existing_record_by_payload_id(
collection_name=collection_name,
payload_id=key,
with_embedding=False,
)
if existing_record:
pointId = existing_record.id
result = self._qdrantclient.delete(collection_name=collection_name, points_selector=[pointId])
if result.status != qdrant_models.UpdateStatus.COMPLETED:
raise ServiceResponseException("Delete failed")
@override
async def remove_batch(self, collection_name: str, keys: list[str]) -> None:
tasks = []
for key in keys:
tasks.append(
self._get_existing_record_by_payload_id(
collection_name=collection_name,
payload_id=key,
with_embedding=False,
)
)
existing_records = await asyncio.gather(*tasks)
if len(existing_records) > 0:
result = self._qdrantclient.delete(
collection_name=collection_name,View on GitHub (pinned to c028a0c7dc)
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.
Example fix
// before
await store.remove('mycol', key)
// after
try:
await store.remove('mycol', key)
except ServiceResponseException:
if await store.get('mycol', key) is None:
pass # effectively deleted
else:
raise Defensive patterns
Strategy: retry
Try / catch
try:
await store.remove(collection_name, key)
except ServiceResponseException:
if await store.get(collection_name, key) is None:
pass # effectively gone
else:
raise Prevention
- 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.
When it happens
Trigger: Calling `await store.remove(collection_name, key)` where the located point's delete operation is acknowledged but not completed within the wait window.
Common situations: Client not configured to wait; deletion under heavy write load; transient cluster issues; the point was found but concurrently removed.
Related errors
- Upsert failed
- Batch upsert failed
- Failed to create collection {collection_name}
- Could not upsert messages.
- The thread could not be deleted due to an error response fro
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/ff3de3d498ba370e.
Report an issue: GitHub.