Description
AsyncQdrantRemote.init makes a blocking synchronous HTTP call via httpx.get() in version_check.py:15 when check_compatibility=True (default), stalling the event loop during client construction.
Root Cause
async_qdrant_remote.py:177 calls get_server_version(), which uses httpx.get() synchronously:
def get_server_version(rest_uri, rest_headers, auth_provider) -> str | None:
response = httpx.get(rest_uri, headers=rest_headers, auth=auth_provider)
Additionally, the user-configured timeout is not forwarded to this call.
Impact
- Blocks the event loop during AsyncQdrantClient(...) construction
- Network issues (latency, DNS, unreachable server) affect all coroutines on the loop
- User-configured timeout is not respected
Notes
check_compatibility=False and singleton client patterns are valid workarounds, but constructing an AsyncQdrantClient should be safe to do in an async context by default.
Suggested Fix
Run get_server_version via asyncio.to_thread(), or refactor it as an async call deferred to first use. The sync client (QdrantRemote) is unaffected.
Description
AsyncQdrantRemote.init makes a blocking synchronous HTTP call via httpx.get() in version_check.py:15 when check_compatibility=True (default), stalling the event loop during client construction.
Root Cause
async_qdrant_remote.py:177 calls get_server_version(), which uses httpx.get() synchronously:
Additionally, the user-configured timeout is not forwarded to this call.
Impact
Notes
check_compatibility=False and singleton client patterns are valid workarounds, but constructing an AsyncQdrantClient should be safe to do in an async context by default.
Suggested Fix
Run get_server_version via asyncio.to_thread(), or refactor it as an async call deferred to first use. The sync client (QdrantRemote) is unaffected.