qdrant_collection_deletionTier 1 · 70% confidence
infrastructure-qdrant-collection-de-qdrantvectorstore-can-unintentionally-delete-an-ex-3b9115f6
agent: infrastructure
When does this happen?
IF QdrantVectorStore can unintentionally delete an existing collection when the existence check fails due to errors (e.g., HTTP 500, timeout) or when the collection is created externally after initialization.
How others solved it
THEN Replace the cached boolean flag with a runtime collection existence check before adding vectors. Use `create_collection` instead of `recreate_collection` to avoid accidental deletion. Ensure the existence check only returns False on definitive non-existence (e.g., 404) and raises on other errors to prevent silent data loss.
def _collection_exists(self, collection_name: str) -> bool:
try:
self._client.get_collection(collection_name)
return True
except (UnexpectedResponse, RpcError, ValueError) as e:
if hasattr(e, 'status_code') and e.status_code == 404:
return False
raise # propagate other errors
def add(self, nodes, **kwargs):
if len(nodes) > 0:
if not self._collection_exists(self.collection_name):
self._client.create_collection(
collection_name=self.collection_name,
vectors_config=rest.VectorParams(...)
)Related patterns
gpu_compatibility
infrastructure-gpu-compatibility-when-running-gemma-2-with-flashinfer-on-an-nvidia--6f3f1857
Tier 1 · 70%
service_resilienceinfrastructure-service-resilience-clickhouse-is-unavailable-causing-trace-ingestion--59b25f81
Tier 1 · 70%
mypy_compatibilityinfrastructure-mypy-compatibility-mypy-reports-has-no-attribute-errors-on-trainer-or-fd61fa5e
Tier 1 · 70%
repo_structureinfrastructure-repo-structure-cloning-a-repository-fails-on-windows-because-a-di-c0798793
Tier 1 · 70%
provider_migrationinfrastructure-provider-migration-need-to-migrate-existing-openai-anthropic-or-googl-3e72218b
Tier 1 · 70%
streamable_http_race_conditioninfrastructure-streamable-http-race-closedresourceerror-in-handle-stateless-request-wh-6a21a92a
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.