Skip to content

Comments

fix: pass context to describe_collection in SearchIteratorV2 (#3271)#3274

Merged
sre-ci-robot merged 2 commits intomilvus-io:2.6from
XuanYang-cn:cp3271
Feb 10, 2026
Merged

fix: pass context to describe_collection in SearchIteratorV2 (#3271)#3274
sre-ci-robot merged 2 commits intomilvus-io:2.6from
XuanYang-cn:cp3271

Conversation

@XuanYang-cn
Copy link
Contributor

  • Forward **kwargs (which includes context carrying db_name) from SearchIteratorV2.__init__ to _set_up_collection_id and then to describe_collection, matching the existing QueryIterator pattern.
  • Without this fix, SearchIteratorV2 always queries the default database, causing "can't find collection" errors for non-default databases.
  • Added regression test verifying context is properly forwarded.

See also: #3270, #3271

  • Existing tests/test_search_iterator.py tests pass
  • New test_context_passed_to_describe_collection regression test passes
  • Lint (make lint) passes

…io#3271)

- Forward `**kwargs` (which includes `context` carrying `db_name`) from
`SearchIteratorV2.__init__` to `_set_up_collection_id` and then to
`describe_collection`, matching the existing `QueryIterator` pattern.
- Without this fix, `SearchIteratorV2` always queries the `default`
database, causing "can't find collection" errors for non-default
databases.
- Added regression test verifying context is properly forwarded.

See also: milvus-io#3270, milvus-io#3271

- [x] Existing `tests/test_search_iterator.py` tests pass
- [x] New `test_context_passed_to_describe_collection` regression test
passes
- [x] Lint (`make lint`) passes

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.79%. Comparing base (bc8c707) to head (e3f9104).
⚠️ Report is 1 commits behind head on 2.6.

Additional details and impacted files
@@           Coverage Diff           @@
##              2.6    #3274   +/-   ##
=======================================
  Coverage   75.79%   75.79%           
=======================================
  Files          62       62           
  Lines       12812    12812           
=======================================
  Hits         9711     9711           
  Misses       3101     3101           

☔ View full report in Codecov by Sentry.
📢 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.

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
@mergify mergify bot added the ci-passed label Feb 10, 2026
@MrPresent-Han
Copy link
Contributor

/lgtm

@sre-ci-robot sre-ci-robot merged commit c1200a4 into milvus-io:2.6 Feb 10, 2026
13 checks passed
@XuanYang-cn XuanYang-cn deleted the cp3271 branch February 10, 2026 07:02
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.

3 participants