Skip to content

feat(client): add health_check method to client classes - #1392

Open
lx3133584 wants to merge 424 commits into
qdrant:devfrom
lx3133584:feat/client-health-check
Open

lx3133584 wants to merge 424 commits into
qdrant:devfrom
lx3133584:feat/client-health-check

Conversation

@lx3133584

Copy link
Copy Markdown

Summary

The Qdrant server exposes /healthz (Kubernetes-style liveness probe), and the underlying service API already provides healthz(). This PR adds a public health_check() method across all client implementations (QdrantClient, AsyncQdrantClient, QdrantRemote, AsyncQdrantRemote, QdrantLocal, AsyncQdrantLocal, and abstract base classes).

Behavior

  • Remote clients (QdrantRemote, AsyncQdrantRemote): call the /healthz endpoint; return True on success and False on any exception (timeout, connection refused, API error).
  • Local clients (QdrantLocal, AsyncQdrantLocal): return not self._closed.
  • Facades (QdrantClient, AsyncQdrantClient): delegate to the underlying client (self._client.health_check()).

Testing

  • Added unit tests in tests/test_health_check.py covering local in-memory clients, remote sync/async mock clients, and closed states.
  • Verified with pytest tests/test_health_check.py and tests/async-client-consistency-check.sh (all pass).

coszio and others added 30 commits July 1, 2024 22:51
* new: add query interface tests, fix version checking

* fix: add missing file
* fix: fix grpc conversion bugs for sparse and multi vectors

* fix: fix mypy
* chore: Added init_options property

* refactor: @Property

* test: init_opts

* chore: regen async client again with Py 3.10

* chore: deepcopy kwargs
* new: set idf modifier in fastembed mixin for bm models

* fix: update poetry lock

* fix: tmp fix, restrict pyright version

* refactor: update bm model extraction, update fastembed

* fix: fix list of bm models

* fix: fix default bm models list value

* refactoring: remove redundant import
* updated test migrate

* removed second remote client

* added back multiple vector test

* added single multi vector

* modified random_multivectors to support single vector

* fix: add version check for backward compatibility tests

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
* new: retry mechanism in migrate

* fixed misdeletion during merging

* fix: minor type hint update

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
* fix: do not modify input structs in-place

* fix: regen async
Solaris-star and others added 29 commits July 24, 2026 12:59
The client docstrings claimed gRPC timeout was unlimited, but
QdrantRemote.DEFAULT_GRPC_TIMEOUT is 5 seconds and is applied when
timeout=None. Align docs with implementation.

Fixes qdrant#1023
* new: deprecate add and query methods

* fix: update async client generator
* fix: update poetry lock

* fix: add type annotations, update poetry.lock

* fix: fix local persistence tests

* fix: replace del client with client.close in local mode persistence tests
…ing field (qdrant#1224)

* fix: check_match() raises TypeError when MatchText applied to non-string field

* tests: move non-string match test to test_nested_filter, cover MatchText and MatchTextAny

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
* fix: spurious async client tests failures

* skip cluster-only test when server is standalone

* increase timeout for unit test performing multiple snapshot operations

* clean up stale snapshots left by previous runs

* fix: remove deleted methods, add/update cluster checks

* fix: remove unused import

* fix: remove redundant indent

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
* fix: update poetry lock

* fix: add type annotations, update poetry.lock

* fix: fix local persistence tests

* fix: replace del client with client.close in local mode persistence tests

* new: update local mode values count filter behaviour
Co-authored-by: Hassan Zafar <hassanzafar619@gmail.com>
)

* Fix local mode filters cross-matching booleans and integers

Python treats bool as a subclass of int (True == 1, False == 0), but Qdrant
keeps booleans and integers as distinct payload value types. Local mode
compared them with a plain `==` / `in` / `isinstance(value, (int, float))`, so:

- MatchValue(value=1) matched a payload of True, and MatchValue(value=True)
  matched a payload of 1 (same for 0 / False)
- MatchAny / MatchExcept cross-matched the same way
- Range matched booleans as if they were 0 / 1

The server never cross-matches these (its ValueVariants keeps Integer and Bool
distinct, and booleans are not numeric for range conditions). Add a type-aware
equality helper used by the value-match conditions, and exclude booleans from
range checks. Adds an in-memory regression test.

* Cover MatchExcept in the bool/int cross-match test

MatchExcept also routes through values_match, so assert that except=[1]
keeps the True payload (bool is not the integer 1).

* Add isolated MatchAny and range asserts to the bool/int cross-match test

Lock the single-value MatchAny path and the check_range bool guard against
regressions, in addition to the existing combined-condition coverage.

* fix: handle floats in cross-match local mode filters, add congruence tests

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
…dropping it (qdrant#1083) (qdrant#1247)

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
* fix: fix embed paths

* tests: add local inference test for complex prefetch
…on (qdrant#1260)

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
* new: 1.19.0 updates

* fix: fix search params as a dict in local mode

* fix: update qdrant backward compatibility version

* fix: add version check to the test

* fix: add version check to the test
* fix: fix nested payload local mode

* test: update test data in complex filter
Fixes qdrant#1289

Signed-off-by: Liang Xu <lx3133584@users.noreply.github.com>
@netlify

netlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 624e7e0
🔍 Latest deploy log https://app.netlify.com/projects/poetic-froyo-8baba7/deploys/6a96ed0b7100d00009d785ff
😎 Deploy Preview https://deploy-preview-1392--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.