3551 Commits

Author SHA1 Message Date
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
XuanYang-cn
d036fd5422
test: Increase PyMilvus version to 2.7.0rc54 for master branch (#45273)
Automated daily bump from pymilvus master branch. Updates
tests/python_client/requirements.txt.

Signed-off-by: XuanYang-cn <xuan.yang@zilliz.com>
2025-11-05 19:35:33 +08:00
congqixia
1e48911825
enhance: [GoSDK] Support struct array field type (#45291)
Related to #42148

Add comprehensive support for struct array field type in the Go SDK,
including data structure definitions, column operations, schema
construction, and full test coverage.

**Struct Array Column Implementation (`client/column/struct.go`)**
- Add `columnStructArray` type to handle struct array fields
- Implement `Column` interface methods:
- `NewColumnStructArray()`: Create new struct array column from
sub-fields
  - `Name()`, `Type()`: Basic metadata accessors
  - `Slice()`: Support slicing across all sub-fields
  - `FieldData()`: Convert to protobuf `StructArrayField` format
  - `Get()`: Retrieve struct values as `map[string]any`
  - `ValidateNullable()`, `CompactNullableValues()`: Nullable support
- Placeholder implementations for unsupported operations (AppendValue,
GetAsX, IsNull, AppendNull)

**Struct Array Parsing (`client/column/columns.go`)**
- Add `parseStructArrayData()` function to parse `StructArrayField` from
protobuf
- Update `FieldDataColumn()` to detect and parse struct array fields
- Support range-based slicing for struct array data

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-11-05 15:43:33 +08:00
zhuwenxing
06933c25b8
test: add geometry datatype in import testcases (#45014)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-04 16:55:33 +08:00
zhenshan.cao
6327c9a514
fix: Fix bugs related to TimestampTz (#45111)
issue: https://github.com/milvus-io/milvus/issues/44527
https://github.com/milvus-io/milvus/issues/44537
https://github.com/milvus-io/milvus/issues/44538
https://github.com/milvus-io/milvus/issues/44585
https://github.com/milvus-io/milvus/issues/44622

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
2025-11-04 16:51:33 +08:00
Feilong Hou
9e4975bdfa
test: added test case for partial update on duplicate pk (#45130)
Issue: #45129
 <test>: <add new test case>
 <also delete duplicate test case>

 On branch feature/partial-update
 Changes to be committed:
	modified:   milvus_client/test_milvus_client_partial_update.py
	modified:   milvus_client/test_milvus_client_upsert.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-11-04 15:47:32 +08:00
zhikunyao
7193d01808
test: support e2e-amd helm in gcp milvus cluster (#45175)
Signed-off-by: Zhikun Yao <zhikun.yao@zilliz.com>
2025-11-04 15:07:32 +08:00
Zhen Ye
576084fe86
enhance: support alter collection/database with WAL-based DDL framework (#45266)
issue: #43897

- Alter collection/database is implemented by WAL-based DDL framework
now.
- Support AlterCollection/AlterDatabase in wal now.
- Alter operation can be synced by new CDC now.
- Refactor some UT for alter DDL.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-11-04 09:59:33 +08:00
zhuwenxing
434e0847fd
test: remove xfail after fix (#45114)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-03 17:21:37 +08:00
zhuwenxing
a03c398986
test: add import case for struct array (#45146)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-03 17:19:39 +08:00
zhuwenxing
a47c168dd7
test: add json dumps for json string data (#45189)
/kind improvement

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

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-03 10:37:33 +08:00
Zhen Ye
309d564796
enhance: support collection and index with WAL-based DDL framework (#45033)
issue: #43897

- Part of collection/index related DDL is implemented by WAL-based DDL
framework now.
- Support following message type in wal, CreateCollection,
DropCollection, CreatePartition, DropPartition, CreateIndex, AlterIndex,
DropIndex.
- Part of collection/index related DDL can be synced by new CDC now.
- Refactor some UT for collection/index DDL.
- Add Tombstone scheduler to manage the tombstone GC for collection or
partition meta.
- Move the vchannel allocation into streaming pchannel manager.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-10-30 14:24:08 +08:00
congqixia
511a04a6a5
enhance: Refactor go_client test wrapper to use embedding and improve test structure (#45113)
Related to #45105

This commit refactors the test MilvusClient wrapper to leverage Go's
embedding pattern and improves test organization with subtests.

**File**: `tests/go_client/base/milvus_client.go`

- **Use `typeutil.NewSet` for rate limiting**: Replace map-based
`rateLogMethods` with `typeutil.NewSet` for cleaner and more efficient
membership checking
- **Embed `*client.Client` directly**: Change `MilvusClient` structure
from wrapping the client as a field to embedding it directly
- **Remove ~380 lines of wrapper methods**: All wrapper methods
(database, collection, partition, index, read/write, RBAC, etc.) are now
unnecessary thanks to Go's embedding feature, which automatically
promotes embedded methods to the outer type
- **Simplify initialization**: Update `NewMilvusClient` and `Close` to
use embedded client directly
- **Fix typo**: Correct comment "Ike the actual method" → "Invoke the
actual method"

**File**: `tests/go_client/testcases/search_test.go`

- **Wrap assertions in subtests**: Each search expression test is now
wrapped in `t.Run()` with descriptive names
- **Dynamic subtest naming**: Format:
`expr={expression}_dynamic-{true/false}` for clear test identification

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-28 16:16:10 +08:00
aoiasd
ad9a0cae48
enhance: add global analyzer options (#44684)
relate: https://github.com/milvus-io/milvus/issues/43687
Add global analyzer options, avoid having to merge some milvus params
into user's analyzer params.

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-10-28 14:52:10 +08:00
Spade A
ce2862d325
fix: fix parquet import bug in STRUCT (#45028)
issue: https://github.com/milvus-io/milvus/issues/45006
ref: https://github.com/milvus-io/milvus/issues/42148

Previsouly, the parquet import is implemented based on that the STRUCT
in the parquet files is hanlded in the way that each field in struct is
stored in a single column.
However, in the user's perspective, the array of STRUCT contains data is
something like STRUCT_A:
for one row, [struct{field1_1, field2_1, field3_1}, struct{field1_2,
field2_2, field3_2}, ...], rather than {[field1_1, field1_2, ...],
[field2_1, field2_2, ...], [field3_1, field3_2, field3_3, ...]}.

This PR fixes this.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-10-27 10:26:06 +08:00
cai.zhang
b069eeecd2
fix: Added GetMetrics back to IndexNodeServer to ensure compatibility (#45073)
issue: #45070

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-24 17:00:06 +08:00
zhuwenxing
1e130683be
test: add geometry datatype in checker (#44794)
/kind improvement

---------

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-10-24 11:28:04 +08:00
Spade A
d8591f9548
fix: csv/json import with STRUCT adapts concatenated struct name (#45000)
After https://github.com/milvus-io/milvus/pull/44557, the field name in
STRUCT field becomes STRUCT_NAME[FIELD_NAME]
This PR make import consider the change.

issue: https://github.com/milvus-io/milvus/issues/45006
ref: https://github.com/milvus-io/milvus/issues/42148

TODO: parquet is much more complex than csv/json, and I will leave it to
a separate PR.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-10-24 10:22:15 +08:00
Feilong Hou
7aa56e1fb6
test: change test_milvus_client_search_json_path_index_all_expressions to L1 (#44986)
Issue: #44989 
On branch feature/json-shredding
Changes to be committed:
modified: milvus_client/test_milvus_client_query.py

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-10-23 16:14:05 +08:00
Spade A
6077178553
enhance: enable STL_SORT to support VARCHAR (#44401)
issue: https://github.com/milvus-io/milvus/issues/44399

This PR implements STL_SORT for VARCHAR data type for both RAM and MMAP
mode.
The general idea is that we deduplicate field values and maintains a
posting list for each unique value.

The serialization format of the index is:
```
[unique_count][string_offsets][string_data][post_list_offsets][post_list_data][magic_code]
string_offsets: array of offsets into string_data section
string_data: str_len1, str1, str_len2, str2, ...
post_list_offsets: array of offsets into post_list_data section
post_list_data: post_list_len1, row_id1, row_id2, ..., post_list_len2, row_id1, row_id2, ...
```

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-10-23 11:00:05 +08:00