3570 Commits

Author SHA1 Message Date
zhuwenxing
3aa0b769e5
test: add unique error message collection in chaos checker (#46262)
/kind improvement

- Add normalize_error_message function to extract and normalize error
text
- Collect unique error messages during chaos test execution
- Display error details in assertion messages for better debugging

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-12-11 13:49:12 +08:00
zhuwenxing
75d6f0d509
test: add ST_ISVALID geometry function test cases (#46232)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-12-11 13:47:21 +08:00
yihao.dai
f32f2694bc
enhance: Implement new FlushAllMessage and refactor flush all (#45920)
This PR:
1. Define and implement the new FlushAllMessage.
2. Refactor FlushAll to flush the entire cluster.

issue: https://github.com/milvus-io/milvus/issues/45919

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-12-10 19:27:13 +08:00
Buqian Zheng
85a7a7b1e3
fix: skip json path index if the query path includes number (#46200)
issue: #45511

our tantivy inverted index currently does not include item index if the
value is an array, thus we can't do `a[0] == 'b'` type of look up in the
inverted index. for such, we need to skip the index and use brute force
search.

we may improve our index in the future, so this is a temp solution

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-12-10 13:59:13 +08:00
liliu-z
3f063a29b0
feat: Support Search By PK (#45820)
issue: #39157

Overview:
Support search by PK by resolving IDs to vectors on Proxy side. Upgrade
go-api to adapt to new proto definitions.

Design:
- Upgrade milvus-proto/go-api to latest master.
- Implement handleIfSearchByPK in Proxy: resolve IDs to vectors via
internal Query, then rewrite SearchRequest.
- Adapt to 'SearchInput' oneof field in SearchRequest across client and
handlers.
- Fix binary vector stride calculation bug in placeholder utils.

Compatibility:
- Old Pymilvus can still work w/o this feature

What is included:
- Dense and Sparse
- Multi vector fields
- Rejection on BM25

What is **not** include:
- Hybrid Search
- EmbeddingList
- Restful API

Signed-off-by: Li Liu <li.liu@zilliz.com>
2025-12-10 10:59:14 +08:00
zhuwenxing
f9ff0e8402
test: add testcases for add/alter/drop text embedding function (#46229)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-12-09 19:23:14 +08:00
zhuwenxing
abe0318bec
test: use predefined fake_de instead of creating new Faker instances to reduce run time (#46194)
related: https://github.com/milvus-io/milvus/issues/46014

/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-12-09 17:59:14 +08:00
Feilong Hou
624147740b
test: fix timestamptz e2e case failure on Jenkins Weekly (#46210)
Issue: #46188 

Bug was caused by inconsistent version of tzdata as well as wrong month
assignment in convert_timestamptz function.
Also fix when debug_mode=True the compare function can correctly return
True or False.

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-09 16:09:15 +08:00
zhuwenxing
8fac376afd
test: upgrade minio sdk from 7.1.5 to 7.2.0 (#46186)
/kind improvement


fix minio sdk error
```
2025-12-08T07:54:48Z {container="step-test"} def _put_object(self, bucket_name, object_name, data, headers, 

2025-12-08T07:54:48Z {container="step-test"} query_params=None): 

2025-12-08T07:54:48Z {container="step-test"} """Execute PutObject S3 API.""" 

2025-12-08T07:54:48Z {container="step-test"} response = self._execute( 

2025-12-08T07:54:48Z {container="step-test"} "PUT", 

2025-12-08T07:54:48Z {container="step-test"} bucket_name, 

2025-12-08T07:54:48Z {container="step-test"} object_name, 

2025-12-08T07:54:48Z {container="step-test"} body=data, 

2025-12-08T07:54:48Z {container="step-test"} headers=headers, 

2025-12-08T07:54:48Z {container="step-test"} query_params=query_params, 

2025-12-08T07:54:48Z {container="step-test"} no_body_trace=True, 

2025-12-08T07:54:48Z {container="step-test"} ) 

2025-12-08T07:54:48Z {container="step-test"} return ObjectWriteResult( 

2025-12-08T07:54:48Z {container="step-test"} bucket_name, 

2025-12-08T07:54:48Z {container="step-test"} object_name, 

2025-12-08T07:54:48Z {container="step-test"} >           response.getheader("x-amz-version-id"), 

2025-12-08T07:54:48Z {container="step-test"} response.getheader("etag").replace('"', ""), 

2025-12-08T07:54:48Z {container="step-test"} response.getheaders(), 

2025-12-08T07:54:48Z {container="step-test"} ) 

2025-12-08T07:54:48Z {container="step-test"} E       AttributeError: 'HTTPResponse' object has no attribute 'getheader' 

2025-12-08T07:54:48Z {container="step-test"}  

2025-12-08T07:54:48Z {container="step-test"} /usr/local/lib/python3.10/site-packages/minio/api.py:1582: AttributeError
```

---------

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-12-09 11:39:12 +08:00
zhuwenxing
4fe41ff14d
test: add emb list recall test (#46135)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-12-08 19:21:13 +08:00
Spade A
253449ea18
fix: add timeout for TestArrayStructDataNodeUtil to avoid blocking (#45867)
issue: https://github.com/milvus-io/milvus/issues/45866

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-12-08 14:41:12 +08:00
XuanYang-cn
2cb6073bdd
test: Increase PyMilvus version to 2.7.0rc83 for master branch (#46072)
Automated daily bump from pymilvus master branch. Updates
tests/python_client/requirements.txt.

Signed-off-by: XuanYang-cn <xuan.yang@zilliz.com>
2025-12-04 17:33:20 +08:00
nico
43fe215787
test: update sdk version and skip some debug log (#46040)
Signed-off-by: nico <cheng.yuan@zilliz.com>
2025-12-04 10:33:11 +08:00
wei liu
f85e86a6ec
fix: change upsert duplicate PK behavior from dedup to error (#45997)
issue: #44320

Replace the DeduplicateFieldData function with CheckDuplicatePkExist
that returns an error when duplicate primary keys are detected in the
same batch, instead of silently deduplicating.

Changes:
- Replace DeduplicateFieldData with CheckDuplicatePkExist in util.go
- Update upsertTask.PreExecute to return error on duplicate PKs
- Simplify helper function from findLastOccurrenceIndices to
hasDuplicates
- Update unit tests to verify the new error behavior
- Add Python integration tests for duplicate PK error cases

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-12-04 10:23:11 +08:00
wei liu
a308331b81
fix: Set replica field in balance plans to prevent panic (#45722)
issue: #45598

The MultiTargetBalancer was missing replica field assignment in the
generated segment and channel plans, which caused panic during balance
operations. This change ensures that all balance plans have the replica
field properly set to fix the panic issue.

Also refactored the balance test to extract common test logic into a
reusable helper function and added a new integration test specifically
for MultipleTargetBalancer policy.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-12-04 10:19:11 +08:00
congqixia
0171511d42
enhance: Bump go version to 1.24.11 fixing CVE (#46034)
Related to CVE-2025-61729

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-03 16:11:11 +08:00
Feilong Hou
dd3797f3ac
test: add timestamptz to more bulk writer case (#46016)
Issue #46015
 <test>: <add timestamptz to more bulk writer>

 On branch feature/timestamps
 Changes to be committed:
	modified:   testcases/test_bulk_insert.py

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-03 10:05:10 +08:00
yanliang567
13a52016ac
test: Update hybrid search tests with milvus client (#46003)
related issue: https://github.com/milvus-io/milvus/issues/45326

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
2025-12-02 18:11:10 +08:00
wei liu
3bb3e8c09e
fix: Enable leader checker to sync segment distribution to RO nodes (#45949)
issue: #45865

- Modified leader_checker.go to include all nodes (RO + RW) instead of
only RW nodes, preventing channel balance from stucking on RO nodes
- Added debug logging in segment_checker.go when no shard leader found
- Enhanced target_observer.go with detailed logging for delegator check
failures to improve debugging visibility
- Fixed integration tests:
- Temporarily disabled partial result counter assertion in
partial_result_on_node_down_test.go pending concurrent issue fix
- Increased transfer channel timeout from 10s to 20s in
manual_rolling_upgrade_test.go to avoid flaky test caused by target
update interval (10s)

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-12-02 10:07:09 +08:00
zhuwenxing
f68bd44f35
test: unify schema retrieval to use get_schema() method in chaos checker (#45985)
/kind improvement


Replace direct self.schema access and describe_collection() calls with
get_schema() method to ensure consistent schema handling with complete
struct_fields information. Also fix FlushChecker error handling and
change schema log level from info to debug.

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-12-02 09:43:10 +08:00
congqixia
fbfbd3bce2
enhance: Bump golang.org/x/crypto fixing CVE (#45975)
Related to #45976

Bump golang.org/x/crypto to v0.45.0 fixing CVE-2025-47914

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-01 20:57:10 +08:00
junjiejiangjjj
dff62c5423
fix: Sum AllSearchCount from multiple search results (#45914)
https://github.com/milvus-io/milvus/issues/45842

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-12-01 14:33:10 +08:00
cai.zhang
b69cd23c7c
fix: Ensure the proxy's shard-leader cache remains stable for coord down test (#45908)
issue: #45847 

After a collection is successfully loaded, the shard-leader state on the
QC may still not be marked as serviceable. It becomes serviceable only
after the scheduled distribution update runs, which will also invalidate
the shard-leader cache on the proxy. Therefore, even if queries are
already executable, the shard-leader mapping on the proxy may still
change afterward.

Try to ensure—as much as possible—that the proxy’s shard-leader cache
remains stable before killing the mixcoord.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-27 19:27:08 +08:00
zhuwenxing
2d7574b5a3
test: refactor connection method to prioritize uri/token and add query limit (#45901)
- Refactor connection logic to prioritize uri and token parameters over
host/port/user/password for a more modern connection approach
- Add explicit limit parameter (limit=5) to search and query operations
in chaos checkers to avoid returning unlimited results
- Migrate test_all_collections_after_chaos.py from Collection wrapper to
MilvusClient API style
- Update pytest fixtures in chaos test files to support uri/token params

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-27 19:25:07 +08:00
cai.zhang
7c9a9c6f7e
fix: Reduce querycoord check node in replica interval for test (#45837)
issue: #45791

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-27 15:07:07 +08:00
zhuwenxing
464a805c63
test: add dynamicfield.enabled property alter in chaos checker (#45625)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-27 14:53:08 +08:00
cai.zhang
61cb29904a
fix: Increase the random suffix of the import test collection name (#45854)
issue: #45853

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-26 16:31:08 +08:00
cai.zhang
72d4df582f
fix: Search before kill coord to ensure proxy init shard leader cache (#45848)
issue: #45847

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-26 04:03:07 +08:00
jac
97da6bd7e3
test: Increase PyMilvus version to 2.7.0rc72 for master branch and fix async teardown logic (#45809)
Signed-off-by: silas.jiang <silas.jiang@zilliz.com>
Co-authored-by: silas.jiang <silas.jiang@zilliz.com>
2025-11-25 11:01:07 +08:00
zhuwenxing
256e073e8d
test: add more testcases for geo and struct (#45414)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-25 10:51:06 +08:00
yanliang567
1da75c0ee2
test: Update hybrid search tests to milvus client style (#45772)
related issue: #45326

---------

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
2025-11-24 17:55:07 +08:00
Feilong Hou
228eb0f5d0
test: add more test cases and add bulk insert scenario (#45770)
Issue: #45756 
1. add bulk insert scenario
 2. fix small issue in e2e cases
 3. add search group by test case
 4. add timestampstz to gen_all_datatype_collection_schema
5. modify partial update testcase to ensure correct result from
timestamptz field

 On branch feature/timestamps
 Changes to be committed:
	modified:   common/bulk_insert_data.py
	modified:   common/common_func.py
	modified:   common/common_type.py
	modified:   milvus_client/test_milvus_client_partial_update.py
	modified:   milvus_client/test_milvus_client_timestamptz.py
	modified:   pytest.ini
	modified:   testcases/test_bulk_insert.py

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-11-24 15:21:06 +08:00
Feilong Hou
0231a3edf8
test: enable all timestamptz case (#45128)
Issue: #44518

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-11-21 11:03:06 +08:00
qixuan
3202847092
test: add field case about dynamic and compaction (#45694)
related issue: #42126

Signed-off-by: qixuan <673771573@qq.com>
2025-11-21 10:07:05 +08:00
junjiejiangjjj
d3164e8030
feat: add configurable batch factor and runtime check bypass for embedding functions (#45592)
https://github.com/milvus-io/milvus/issues/45544
- Add batch_factor configuration parameter (default: 5) to control
embedding provider batch sizes
- Add disable_func_runtime_check property to bypass function validation
during collection creation
- Add database interceptor support for AddCollectionFunction,
AlterCollectionFunction, and DropCollectionFunction requests

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-11-20 19:55:04 +08:00
XuanYang-cn
b95bbaffae
test: Increase PyMilvus version to 2.7.0rc60 for master branch (#45600)
Automated daily bump from pymilvus master branch. Updates
tests/python_client/requirements.txt.

Signed-off-by: XuanYang-cn <xuan.yang@zilliz.com>
2025-11-20 16:53:08 +08:00
zhikunyao
aa0870d2ff
test: add e2e-v2 helm for amd (#45621)
Signed-off-by: Zhikun Yao <zhikun.yao@zilliz.com>
2025-11-20 13:45:11 +08:00
zhuwenxing
e0df44481d
test: refactor checker to using milvus client (#45524)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-20 11:59:08 +08:00
Bingyi Sun
1ba75eea62
enhance: skip test_milvus_client_search_json_path_index_default (#45604)
To prevent this issue from blocking other PRs, we are temporarily
disabling this test. A proper fix will be implemented before the 2.6.6
release.

issue: https://github.com/milvus-io/milvus/issues/45511

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-11-18 10:54:09 +08:00
wei liu
7aed88113c
enhance: Deduplicate primary keys in upsert request batch (#45249)
issue: #44320

This change adds deduplication logic to handle duplicate primary keys
within a single upsert batch, keeping the last occurrence of each
primary key.

Key changes:
- Add DeduplicateFieldData function to remove duplicate PKs from field
data, supporting both Int64 and VarChar primary keys
- Refactor fillFieldPropertiesBySchema into two separate functions:
validateFieldDataColumns for validation and fillFieldPropertiesOnly for
property filling, improving code clarity and reusability
- Integrate deduplication logic in upsertTask.PreExecute to
automatically deduplicate data before processing
- Add comprehensive unit tests for deduplication with various PK types
(Int64, VarChar) and field types (scalar, vector)
- Add Python integration tests to verify end-to-end behavior

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-11-17 21:35:40 +08:00
Spade A
0454cdaab3
fix: remove validateFieldName in dropIndex (#45460)
issue: https://github.com/milvus-io/milvus/issues/45459

This check is unnecessary when dropping index.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-11-14 10:17:37 +08:00
Feilong Hou
db42b2df75
test: fix partial update chaos checker (#45492)
Issue: #45489 
<fix>: <fix partial update chaos checker>

 On branch feature/partial-update
 Changes to be committed:
	modified:   chaos/checker.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-11-13 17:29:37 +08:00
XuanYang-cn
e31eec2921
test: Increase PyMilvus version to 2.7.0rc56 for master branch (#45515)
Automated daily bump from pymilvus master branch. Updates
tests/python_client/requirements.txt.

Signed-off-by: XuanYang-cn <xuan.yang@zilliz.com>
2025-11-13 11:33:41 +08:00
zhuwenxing
6a093887d8
test: fix apikey setting in restful v2 testcases (#45396)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-11 17:27:40 +08:00
Zhen Ye
4797bb6ab2
fix: wrong update timetick of collection meta info (#45461)
issue: #45403, #45463

- fix the Nightly E2E failures.
- fix the wrong update timetick of altering collection to fix the
related load failure.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-11-11 16:01:36 +08:00
zhuwenxing
b1af0df9f3
test: add struct array mmap testcases (#45309)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-10 16:49:36 +08:00
Amit Kumar
388d56fdc7
enhance: Add support for minimum_should_match in text_match (parser, engine, client, and tests) (#44988)
### Is there an existing issue for this?

- [x] I have searched the existing issues

---

Please see: https://github.com/milvus-io/milvus/issues/44593 for the
background

This PR makes https://github.com/milvus-io/milvus/pull/44638 redundant,
which can be closed. The PR comments for the original implementation
suggested an alternative and a better approach, this new PR has that
implementation.

---

This PR

- Adds an optional `minimum_should_match` argument to `text_match(...)`
and wires it through the parser, planner/visitor, index bindings, and
client-level tests/examples so full-text queries can require a minimum
number of tokens to match.

Motivation
- Provide a way to require an expression to match a minimum number of
tokens in lexical search.

What changed
- Parser / grammar
- Added grammar rule and token: `MINIMUM_SHOULD_MATCH` and
`textMatchOption` in `internal/parser/planparserv2/Plan.g4`.
- Regenerated parser outputs: `internal/parser/planparserv2/generated/*`
(parser, lexer, visitor, etc.) to support the new rule.
- Planner / visitor
- `parser_visitor.go`: parse and validate the `minimum_should_match`
integer; propagate as an extra value on the `TextMatch` expression so
downstream components receive it.
  - Added `VisitTextMatchOption` visitor method handling.
- Client (Golang)
- Added a unit test to verify `text_match(...,
minimum_should_match=...)` appears in the generated DSL and is accepted
by client code: `client/milvusclient/read_test.go` (new test coverage).
- Added an integration-style test for the feature to the go-client
testcase suite: `tests/go_client/testcases/full_text_search_test.go`
(exercise min=1, min=3, large min).
- Added an example demonstrating `text_match` usage:
`client/milvusclient/read_example_test.go` (example name conforms to
godoc mapping).
- Engine / index
  - Updated C++ index interface: `TextMatchIndex::MatchQuery`
- Added/updated unit tests for the index behavior:
`internal/core/src/index/TextMatchIndexTest.cpp`.
- Tantivy binding 
- Added `match_query_with_minimum` implementation and unit tests to
`internal/core/thirdparty/tantivy/tantivy-binding/src/index_reader_text.rs`
that construct boolean queries with minimum required clauses.



Behavioral / compatibility notes
- This adds an optional argument to `text_match` only; default behavior
(no `minimum_should_match`) is unchanged.
- Internal API change: `TextMatchIndex::MatchQuery` signature changed
(internal component). Callers in the repo were updated accordingly.
- Parser changes required regenerating ANTLR outputs 

Tests and verification
- New/updated tests:
- Go client unit test: `client/milvusclient/read_test.go` (mocked Search
request asserts DSL contains `minimum_should_match=2`).
- Go e2e-style test:
`tests/go_client/testcases/full_text_search_test.go` (exercises min=1, 3
and a large min).
- C++ unit tests for index behavior:
`internal/core/src/index/TextMatchIndexTest.cpp`.
  - Rust binding unit tests for `match_query_with_minimum`.
- Local verification commands to run:
- Go client tests: `cd client && go test ./milvusclient -run ^$` (client
package)
- Go testcases: `cd tests/go_client && go test ./testcases -run
TestTextMatchMinimumShouldMatch` (requires a running Milvus instance)
- C++ unit tests / build: run core build/test per repo instructions (the
change touches core index code).
- Rust binding tests: `cd
internal/core/thirdparty/tantivy/tantivy-binding && cargo test` (if
developing locally).

---------

Signed-off-by: Amit Kumar <amit.kumar@reddit.com>
Co-authored-by: Amit Kumar <amit.kumar@reddit.com>
2025-11-07 16:07:11 +08:00
aoiasd
6102f001a9
enhance: skip check source id (#45377)
relate:https://github.com/milvus-io/milvus/issues/45381

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-11-07 15:19:34 +08:00
congqixia
4a6e8d822c
enhance: Bump go version to 1.24.9 (#45359)
Fixing CVE-2025-58187

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-11-07 10:13:35 +08:00
yanliang567
a2282d61cb
test: Add more async tests (#45327)
related issue: #45326

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
2025-11-06 15:43:33 +08:00