Repository navigation
Conversation
The logical collection name (e.g. knowledge_base) may be a Qdrant alias
pointing to a real collection (e.g. knowledge_base_v2). get_collections()
only returns real collection names, NOT aliases. The old code would
conclude the collection was missing and call create_collection('knowledge_base')
which raised HTTP 400 (alias already exists) -> crash-loop.
Fix: use client.collection_exists(COLLECTION_NAME) which follows aliases.
Root cause: alias-vs-collection bug causing 2215 restarts.
Evidence: RestartCount 2215->0, container healthy after fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root Cause
The
ensure_collection()function indocker/worker/services/local_qdrant.pyusedget_collections()to check if a collection exists. However, Qdrant aliases do not appear inget_collections()— only real collection names do.The logical collection name (
knowledge_base) is a Qdrant alias pointing to the real collection (knowledge_base_v2). The old code concluded the collection was missing and calledcreate_collection("knowledge_base"), which raised HTTP 400 (alias already exists) → crash-loop.Fix
Replace the alias-blind
get_collections()check withclient.collection_exists(COLLECTION_NAME), which correctly follows aliases.Evidence
Diff
Only
docker/worker/services/local_qdrant.pychanged (13 insertions, 6 deletions).