Skip to content

fix: keep struct params in describe_collection - #3904

Merged
sre-ci-robot merged 1 commit into
milvus-io:masterfrom
zhengbuqian:fix-struct-describe-params
Nov 5, 2026
Merged

sre-ci-robot merged 1 commit into
milvus-io:masterfrom
zhengbuqian:fix-struct-describe-params

Conversation

@zhengbuqian

Copy link
Copy Markdown
Collaborator

MilvusClient.describe_collection converts each struct array field to the user format with convert_struct_fields_to_user_format. That function built the struct's params from the sub-fields' max_capacity only and ignored the struct's own params. Struct-level properties set at create time, such as mmap_enabled and warmup, are stored by the server and returned in the describe response (REST v2 describe shows them), but pymilvus dropped them.

Changes:

  • convert_struct_fields_to_user_format copies the struct's own params into the result before setting max_capacity.

Tests: new unit test in tests/unit/test_utils.py. tests/unit passes locally (5490 passed, 1 skipped). Checked against a running Milvus: a struct created with mmap_enabled=True, warmup="sync" now describes as {'mmap_enabled': True, 'warmup': 'sync', 'max_capacity': 3}; before the change it was {'max_capacity': 3}.

MilvusClient.describe_collection rebuilt the struct field params from the sub-fields' max_capacity only, so the struct's own params such as mmap_enabled and warmup were dropped. Copy them over before setting max_capacity.

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
@mergify

mergify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@codecov

codecov Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.73%. Comparing base (e9e90a6) to head (91323a0).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3904   +/-   ##
=======================================
  Coverage   94.73%   94.73%           
=======================================
  Files          81       81           
  Lines       17102    17105    +3     
=======================================
+ Hits        16201    16204    +3     
  Misses        901      901           

☔ 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.

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XuanYang-cn, zhengbuqian

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

The pull request process is described 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

@sre-ci-robot
sre-ci-robot merged commit 1dfdc1c into milvus-io:master Nov 5, 2026
14 checks passed
@pymilvus-bot

Copy link
Copy Markdown
Collaborator

✅ Backport Created
Hi @zhengbuqian, Backport PR for 3.0 has been created: #3923

(cc @XuanYang-cn)

sre-ci-robot pushed a commit that referenced this pull request Nov 5, 2026
…#3923)

Backport of #3904 to `3.0`.

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
Signed-off-by: pymilvus-bot <pymilvus-bot@users.noreply.github.com>
Co-authored-by: Buqian Zheng <zhengbuqian@gmail.com>
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.

4 participants