fix(qdrant): verify collection existence in the readiness check

Why:
- The chunks collection is now created by an explicit deployment step
  (qdrant_bootstrap), not at startup, which means a process can boot against
  a healthy Qdrant that has no collection at all. /readyz's previous check
  only called get_collections(), so it reported ready in that state — the
  misconfiguration stayed invisible until the first upload failed with a 502
  after already paying for the MinIO write and embedding round trips.

Changes:
- ping_qdrant() now checks collection_exists(collection) instead of just
  reachability.
This commit is contained in:
Ali Zarinkolah
2026-08-20 18:17:56 +03:30
parent cc915f0f1a
commit fa933b08ff
3 changed files with 63 additions and 4 deletions

View File

@@ -23,7 +23,9 @@ async def readyz(request: Request, response: Response) -> dict[str, bool]:
postgres_ready, minio_ready, qdrant_ready = await asyncio.gather(
ping_postgres(resources.db_engine, timeout),
ping_minio(resources.minio_client, timeout),
ping_qdrant(resources.qdrant_client, timeout),
ping_qdrant(
resources.qdrant_client, timeout, collection=resources.settings.qdrant.collection
),
)
result = {