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

  1. Retry remove() with backoff for transient non-COMPLETED statuses.
  2. Configure QdrantClient for synchronous confirmation.
  3. Catch ServiceResponseException and verify removal via a follow-up get().
  4. 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

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


AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13). Data as JSON: /api/errors/ff3de3d498ba370e. Report an issue: GitHub.