Skip to content

[Enhancement]: Add query_iterator to AsyncMilvusClient #3742

Description

@csy1204

Is there an existing issue for this?

  • I have searched the existing issues

What would you like to be added?

MilvusClient.query_iterator() has no counterpart on AsyncMilvusClient. Please add AsyncMilvusClient.query_iterator(), returning an async iterator with next() / close() / get_cursor() and matching the sync signature.

Why is this needed?

Async users who need to walk a whole filtered result set currently have to fall back to query(..., limit=N). query has no ordering guarantee, so which N rows come back is undefined — it depends on segment scan order and compaction. The only correct alternative today is hand-rolling primary-key cursor pagination in application code, including the mvcc-timestamp pinning that the sync iterator already does.

Anything else?

A previous attempt (#3483) bundled this with six unrelated changes and was closed before review. That patch also passed the async handler into the sync QueryIterator, whose next() calls handler.query(...) synchronously — it would receive a coroutine instead of rows. A working implementation needs an async driver.

I have a focused patch ready and will open a PR referencing this issue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions