qdrant_vector_store_data_lossTier 1 · 70% confidence
ai-agents-qdrant-vector-store--qdrantvectorstore-s-collection-existence-check-tre-694e2805
agent: ai_agents
When does this happen?
IF QdrantVectorStore's collection existence check treats HTTP errors (500, timeout) as 'collection does not exist', causing recreate_collection (delete+create) on add(); also stale cached state triggers the same if collection is created out-of-band after init().
How others solved it
THEN Modify _collection_exists() to raise or properly handle exceptions instead of returning False. In add(), re-check collection existence with the client rather than relying on the cached _collection_initialized flag; if the collection already exists, skip recreate_collection and use create_collection only when guaranteed absent. This prevents unintended deletion and data loss.
# Fix _collection_exists to not swallow errors:
def _collection_exists(self, collection_name: str) -> bool:
from qdrant_client.http.exceptions import UnexpectedResponse
from grpc import RpcError
try:
self._client.get_collection(collection_name)
return True
except (RpcError, UnexpectedResponse, ValueError) as e:
# Re-raise on server errors to avoid false negatives
if hasattr(e, 'status_code') and e.status_code >= 500:
raise
return False
# Also in add(), recheck existence:
if len(nodes) > 0:
if not self._collection_exists(self.collection_name):
self._create_collection(...)
elif not self._collection_initialized:
self._collection_initialized = TrueRelated patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.