Skip to content

feat: add synchronous LoadCollection warmup option - #3786

Open
sunby wants to merge 1 commit into
milvus-io:masterfrom
sunby:codex/load-collection-sync-warmup-upstream
Open

feat: add synchronous LoadCollection warmup option#3786
sunby wants to merge 1 commit into
milvus-io:masterfrom
sunby:codex/load-collection-sync-warmup-upstream

Conversation

@sunby

@sunby sunby commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Add explicit warmup="sync" handling to the shared LoadCollection request builder used by synchronous and asynchronous handlers.

  • Encode the option as LoadCollectionRequest.load_params["warmup"] = "sync".
  • Preserve existing behavior when the option is omitted.
  • Reject unsupported values and explicit sync together with refresh / _refresh.
  • Preserve existing load priority, replica and field-selection options.

This is a clean, single-commit PR based on upstream master (a4b3b38b): only pymilvus/client/prepare.py and tests/unit/test_load_warmup.py change, with 37 added lines. The fork's namespace commits and local protobuf submodule changes are not included.

References

Validation

Verified in an isolated checkout of this upstream-based commit:

  • pytest tests/unit/prepare/test_collection.py tests/unit/test_load_warmup.py -q: 73 passed, including all 10 new warmup cases.
  • Ruff check and Ruff format check passed for both changed files.
  • Black format check passed for both changed files.
  • git diff --check passed.

Release boundary

Keep this PR as Draft pending the corresponding server support and SDK/server E2E acceptance. Request serialization and validation are tested; actual synchronous cache warmup is not verified by these tests. The proposed server feature gate remains disabled by default. This SDK change does not negotiate capabilities and cannot guarantee warmup on older or otherwise unsupported servers.

Signed-off-by: sunby <sunbingyi1992@gmail.com>
@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sunby
To complete the pull request process, please assign tedxu after the PR has been reviewed.
You can assign the PR to them by writing /assign @tedxu in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.22%. Comparing base (a4b3b38) to head (f34ab6a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3786   +/-   ##
=======================================
  Coverage   94.22%   94.22%           
=======================================
  Files          77       77           
  Lines       16204    16210    +6     
=======================================
+ Hits        15268    15274    +6     
  Misses        936      936           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify Bot added the ci-passed label Sep 8, 2026
@sunby
sunby marked this pull request as ready for review September 8, 2026 03:41
@mergify

mergify Bot commented Sep 8, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants