Commit Graph

11130 Commits (master)

Author SHA1 Message Date
Spade A d41eec6f10
fix: void copy when getting json chunk (#43183)
fix: https://github.com/milvus-io/milvus/issues/43182

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-07-08 15:28:46 +08:00
cai.zhang 8720feeb79
fix: Fix enqueuing when current batch is fully deleted (#43174)
issue: #43045

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-08 12:20:46 +08:00
Ted Xu 6153272d4b
enhance: disabling max entry limit by default (#43166)
See: #43055

---------

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-07-08 10:10:46 +08:00
yihao.dai 9cbd194c6b
fix: Prevent import from generating small binlogs (#43132)
- Introduce dynamic buffer sizing to avoid generating small binlogs
during import
- Refactor import slot calculation based on CPU and memory constraints
- Implement dynamic pool sizing for sync manager and import tasks
according to CPU core count

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-07-07 21:32:47 +08:00
sthuang a0ae5bccc9
fix: [StorageV2] load growing segment get dim datatype check (#43168)
related: https://github.com/milvus-io/milvus/issues/43072

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-07-07 15:46:47 +08:00
congqixia ab818dcbca
fix: [StorageV2] Pass storage config for compaction rw (#43167)
Related to #43148

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-07 15:32:46 +08:00
sthuang 276c52490d
fix: [StorageV2] missing arrow fs when building index (#43162)
fix: https://github.com/milvus-io/milvus/issues/43150,
https://github.com/milvus-io/milvus/issues/43149

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-07-07 15:26:46 +08:00
sthuang 9f361a228e
enhance: storage v2 chunked column memory size from meta (#43130)
use meta to get chunked column memory size to avoid getting cells
actually from storage.
related: #39173

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-07-07 14:24:46 +08:00
congqixia d09764508a
fix: [Storagev2] Close segment readers in mergeSort (#43116)
Related to #43062

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-04 23:56:44 +08:00
junjiejiangjjj fafd5db43f
fix: rank params bug (#43112)
https://github.com/milvus-io/milvus/issues/42985

Signed-off-by: junjiejiangjjj <junjie.jiang@zilliz.com>
2025-07-04 18:28:44 +08:00
Zhen Ye 46b6f1b9e2
fix: panic when logging a old message should be skipped (#43076)
issue: #43074

- fix: panic when logging a old message should be skipped, #43074 
- fix: make the ack of broadcaster idompotent, #43026
- fix: lost dropping collection when upgrading, #43092
- fix: panic when DropPartition happen after DropCollection, #43027,
#43078

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-04 16:04:44 +08:00
groot 1ee8cea35b
enhance: bulkinsert handle nullable/defaultValue/functionOutput fields (#42956)
issue: https://github.com/milvus-io/milvus/issues/42173

Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-07-04 14:20:44 +08:00
congqixia 684f027496
fix: Remove trimming space logic when validating collection name (#43064)
Related to #43031

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-04 11:00:45 +08:00
cai.zhang 4133e3b8fd
fix: Enable merge sort and fix sort bug (#43080)
issue: #42980, #43034

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-04 10:18:44 +08:00
Spade A fce0bbe2ae
fix: remove redundant locks for null_offset (#43103)
Ref: https://github.com/milvus-io/milvus/issues/40308
https://github.com/milvus-io/milvus/pull/40363 add lock for protecting
concurrent read/write for null offset. But we don't need this for sealed
segment.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-07-04 10:10:45 +08:00
Zhen Ye e97e44d56e
enhance: limit the gc concurrency when cpu is high (#43059)
issue: #42833

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-04 09:22:43 +08:00
congqixia 1d9a9a993d
fix: [StorageV2] Use correct template typename for `cache_raw_data_to_disk_common` (#43104)
Related to #43099

Previously `cache_raw_data_to_disk_common` used `milvus::DataType`
template typename, which shall be `knowhere::bf16` or other actual
datatype.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-03 18:50:46 +08:00
Zhen Ye bbbc7d4517
enhance: collect all cgo calling into metric and log slow cgo call (#43035)
issue: #42833

- also fix the error metric for async cgo.
- also make sure the roles can be seen when node startup, #43041.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-03 15:00:44 +08:00
cai.zhang f6b2a71c95
enhance: Remove chunkmanager-related dependencies from datanode (#43021)
issue: #41611

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-03 14:44:45 +08:00
congqixia 1fae5230fe
fix: Check field mmap property before apply collection level one (#43090)
Related to #43089

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-03 14:30:44 +08:00
Bingyi Sun 6e38e9d18f
fix: Add json cast type for flat index (#42970)
issue: #42916

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-07-03 14:14:44 +08:00
sparknack 7e855f1046
enhance: add disk file writer with Direct IO support (#42665)
issue: #43040 

This patch introduces a disk file writer that supports Direct IO.

Currently, it is exclusively utilized during the QueryNode load process.

Below is its parameters:

1. `common.diskWriteMode`
This parameter controls the write mode of the local disk, which is used
to write temporary data downloaded from remote storage.
Currently, only QueryNode uses 'common.diskWrite*' parameters. Support
for other components will be added in the future.
The options include 'direct' and 'buffered'. The default value is
'buffered'.

2. `common.diskWriteBufferSizeKb`
Disk write buffer size in KB, only used when disk write mode is
'direct', default is 64KB.
Current valid range is [4, 65536]. If the value is not aligned to 4KB,
it will be rounded up to the nearest multiple of 4KB.

3. `common.diskWriteNumThreads`
This parameter controls the number of writer threads used for disk write
operations. The valid range is [0, hardware_concurrency].
It is designed to limit the maximum concurrency of disk write operations
to reduce the impact on disk read performance.
For example, if you want to limit the maximum concurrency of disk write
operations to 1, you can set this parameter to 1.
The default value is 0, which means the caller will perform write
operations directly without using an additional writer thread pool.
In this case, the maximum concurrency of disk write operations is
determined by the caller's thread pool size.

Both parameters can be updated during runtime.

---------

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-07-02 22:18:44 +08:00
congqixia 7bc7b18ed5
fix: [AddField] Prevent concurrent load during UpdateSchema (#43043)
Related to #43028

This PR:
- Add mutex prevent concurrent load segment & schema change
- Add schema verison field in load meta
- Update schema in PutOrRef if schema verison is larger

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-02 17:38:44 +08:00
congqixia 8962b0058d
fix: [StorageV2] Check writer nil when closing not written one (#43056)
Related to #43047

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-02 14:22:43 +08:00
Zhen Ye 09c6df62d8
fix: use impl and remove the close method of broadcast service (#42992)
issue: #38399

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-02 10:30:44 +08:00
wei liu c381bf3e41
enhance: add logs for count(*) (#43001)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-07-01 19:36:43 +08:00
Zhen Ye 08fff353af
fix: Revert "enhance: Enable mergeSort by default starting from version 2.6.0 (#42981)" (#43046)
issue: #43034

- implementation of mergeSortMultipleSegments is wrong.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-01 17:30:29 +08:00
Spade A 26ec841feb
feat: optimize `Like` query with n-gram (#41803)
Ref #42053

This is the first PR for optimizing `LIKE` with ngram inverted index.
Now, only VARCHAR data type is supported and only InnerMatch LIKE
(%xxx%) query is supported.


How to use it:
```
milvus_client = MilvusClient("http://localhost:19530")
schema = milvus_client.create_schema()
...
schema.add_field("content_ngram", DataType.VARCHAR, max_length=10000)
...
index_params = milvus_client.prepare_index_params()
index_params.add_index(field_name="content_ngram", index_type="NGRAM", index_name="ngram_index", min_gram=2, max_gram=3)
milvus_client.create_collection(COLLECTION_NAME, ...)
```

min_gram and max_gram controls how we tokenize the documents. For
example, for min_gram=2 and max_gram=4, we will tokenize each document
with 2-gram, 3-gram and 4-gram.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
Signed-off-by: SpadeA-Tang <tangchenjie1210@gmail.com>
2025-07-01 10:08:44 +08:00
wei liu 396120ade5
enhance: Improve delegator serviceable check with coordinator sync state (#42975)
issue: #42404
Add syncedByCoord field to ensure delegator only becomes serviceable
after coordinator sync, preventing unreliable service state when memory
is insufficient.

Issue: When memory is low, delegator may become serviceable before
current target is ready, but segments can be released at any time,
making the serviceable state unreliable.

Changes include:
- Add syncedByCoord field to track coordinator sync status
- Update Serviceable() to require both data readiness and coord sync
- Set syncedByCoord=true in SyncTargetVersion
- Add comprehensive test coverage

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-07-01 10:00:43 +08:00
Zhen Ye ecb24e7232
enhance: use multi-process framework in integration test (#42976)
issue: #41609

- add env `MILVUS_NODE_ID_FOR_TESTING` to set up a node id for milvus
process.
- add env `MILVUS_CONFIG_REFRESH_INTERVAL` to set up the refresh
interval of paramtable.
- Init paramtable when calling `paramtable.Get()`.
- add new multi process framework for integration test.
- change all integration test into multi process.
- merge some test case into one suite to speed up it.
- modify some test, which need to wait for issue #42966, #42685.
- remove the waittssync for delete collection to fix issue: #42989

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-30 14:22:43 +08:00
wei liu c919340763
enhance: Optimize channel node balancing for uneven QN distribution (#42786)
issue: #42860
Fix channel node allocation when QueryNode count is not a multiple of
channel count. The previous algorithm used simple division which caused
uneven distribution with remainders.

Key improvements:
- Implement smart remainder distribution algorithm
- Refactor large function into focused helper functions
- Support two-phase rebalancing (release then allocate)
- Handle edge cases like insufficient nodes gracefully

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-30 12:14:42 +08:00
rhys 48661655d6
fix: streamingcoord and streamingnode client support internal tls (#42685)
https://github.com/milvus-io/milvus/issues/42680

streamingnode/streamingcoord support internal tls

Signed-off-by: rhys <sdbwlr@163.com>
2025-06-27 17:50:42 +08:00
Zhen Ye 8367e4ec6a
fix: set 72h for wal retention (#42910)
issue: #42706

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-27 17:36:43 +08:00
Bingyi Sun 23c784cf69
fix: Fix querynode crash caused by json index (#42982)
issue: https://github.com/milvus-io/milvus/issues/42978

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-27 16:44:41 +08:00
XuanYang-cn 17f1ab71bb
enhance: Remove not inused BuildIndexInfo (#42926)
1. removed not inuse cgo methods in index_c.h/cpp
2. removed indexcogowrapper/build_index_info.go

See also: #39242

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-06-27 15:00:42 +08:00
congqixia 9b06ecb72f
enhance: [StorageV2] Release record and close reader (#42983)
Related to #39173

This PR
- Close packed reader after sort
- Release arrow.Record preventing memory leakage
- Invoke `pack_reader->Close()` for CloseReader

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-27 14:46:43 +08:00
sthuang 238bd30f42
fix: [StorageV2] end to end minor issues for sync, stats, and load (#42948)
Fix issues in end-to-end tests: 
1. **Split column groups based on schema**, rather than estimating by
average chunk row size. **Ensure column group consistency within a
segment**, to avoid errors caused by loading multiple column group
chunks simultaneously.
2. **Use sorted segmentId** when generating the stats binlog path, to
ensure consistent and correct file path resolution.
3. **Determine field IDs as follows**:
For multi-column column groups, retrieve the field ID list from
metadata.
For single-column column groups, use the column group ID directly as the
field ID.

related: #39173 
fix: #42862

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-27 14:44:42 +08:00
Zhen Ye 2d73e6eaa8
fix: mixcoord will not handle timetick anymore (#42965)
issue: #42954

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-26 19:14:42 +08:00
Zhen Ye 3602817c53
fix: dynamic log level for streaming node (#42964)
issue: #42963

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-26 19:12:50 +08:00
congqixia 5dd1f841d2
enhance: [AddField] Add Restful API for addfield (#42972)
Related to #39718

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-26 18:46:41 +08:00
Bingyi Sun 289b8b85d3
enhance: remove name check for alter index task (#42953)
issue: https://github.com/milvus-io/milvus/issues/42952

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-26 16:32:41 +08:00
foxspy be05b653c1
enhance: update knowhere version (#42938)
issue: #42937

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-06-26 01:22:41 +08:00
yihao.dai d7c9914eff
fix: Consider fields number when preallocating ids for import (#42810)
In corner cases where there are many fields but only a small number of
rows to import, the default preallocated IDs may be insufficient. To
address this, consider the number of fields when preallocating IDs.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-06-25 23:38:41 +08:00
wei liu be492c2939
fix: Add missing keylocks in ReleasePartition operation (#42940)
issue: #42098
Fix concurrent access issue by adding proper locking around
ReleasePartition operation to prevent race conditions when releasing
partitions on the same collection.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-25 21:48:42 +08:00
congqixia 336e743b55
fix: [AddField] Respect growing mmap setting adding empty field (#42933)
Related to #42856

Data under mmapped growing segment shall be treated respecting
growingMmap setting. Otherwise, varchar datatype could be treated with
logic error.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-25 21:10:42 +08:00
congqixia 942055fa7d
fix: Use task timestamp to calculate TTL timestamp (#42920)
Related to #42918

Previously the `CollectionTtlTimestamp` could be overflowed when the
guarantee_ts==1, which means using `Eventually` consistency level.

This patch use task timestamp, allocated by scheduler, to generate ttl
timestamp ignore the potential very small timestamp being used.

Also add overflow check for ttl timestamp calculated.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-25 20:48:42 +08:00
zhagnlu 69872f45ad
fix: fix is_not_in for trie index (#42716)
#42604

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-06-25 16:52:42 +08:00
cai.zhang ebe1c95bb1
enhance: Add Size interface to FileReader to eliminate the StatObject call during Read (#42908)
issue: #42907

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-25 14:36:41 +08:00
aoiasd e2566c0e92
enhance: bm25 stats local cache use local storage path (#42923)
Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-25 13:44:46 +08:00
XuanYang-cn 0dfe5308e1
enhance: Tidy Download and decode in segcore storage (#42902)
1. Unify calling from GetObjectData
2. Move SetData inside Deserialize

See also: #40013

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-06-25 11:10:43 +08:00
sthuang 0d57acb13a
enhance: [StorageV2] field id as meta path for wide column when load (#42863)
related: #42862 #39173

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-25 11:08:48 +08:00
sthuang d4260b47fa
fix: [StorageV2] sync panic with add field (#42932)
related: #39663

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-25 10:08:40 +08:00
sthuang ad6d620e9f
fix: [StorageV2] Compiling debug mode throw DCHECK s3 initialize error (#42922)
related: https://github.com/milvus-io/milvus/issues/42844

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-24 19:30:41 +08:00
Spade A 50f7579d8f
fix: fix some bugs discovered by chaos tests (#42906)
fix: https://github.com/milvus-io/milvus/issues/42870

This PR fixes:
1. SetBitset fn shuold consider growing segments with concurrent write
2. avoid using from_raw_parts directly

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-06-24 16:32:42 +08:00
XuanYang-cn 0adf44e6f8
enhance: Check if segment has too many deletions together (#42668)
This PR moves the deltalog file count check inside hasTooManyDeletions
check. Unifies the logic on checking if a segment has too many deletions
including: delta log count, deleted rows ratio and deltalog size.

This change removes several uncessary traverse through segment's binlogs
and deltalogs. And add more clear trigger logs

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-06-24 16:30:49 +08:00
Bingyi Sun 669ea51ce5
enhance: Make json index compatible with caching layer (#42484)
issue: https://github.com/milvus-io/milvus/issues/42483

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-24 15:16:41 +08:00
congqixia 718cd203c6
fix: OR binary expr is prunable only when both children are prunable (#42912)
Related to #42903

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-24 09:38:24 +08:00
zhagnlu 1024121ad9
fix:fix incorrect use of class member (#42885)
#39173

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-06-23 20:36:46 +08:00
congqixia 0a0a6b3471
enhance: Fill dbName for `OperatePrivilegeV2Request` in interceptor (#42898)
Related to #40340

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-23 18:04:41 +08:00
cai.zhang 59b003adac
enhance: Skip modify field meta when rename collection or rename dbName (#42875)
issue: #42873

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-23 17:04:41 +08:00
congqixia ee056f0bff
fix: [AddField] Fill default value in serde logic when field missing (#42891)
Related to #42856

Default value will be missing after segment get sorted/compacted. This
PR is a temp workaround since in long term default value shall be filled
with storage engine instead.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-23 14:20:41 +08:00
Bingyi Sun 24e24caf14
fix: Remove cached null expr result (#42818)
issue: #42698
cached result may be changed in caller so there is no need to cache it

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-23 10:44:40 +08:00
Zhen Ye a081906fb4
enhance: smaller backoff configuration for wal balancer to make faster recovery (#42869)
issue: #42835

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-23 10:32:40 +08:00
Xianhui Lin b902960057
fix: revert remote jsonstats path (#42882)
fix: revert remote jsonstats path
relate-pr:https://github.com/milvus-io/milvus/pull/42676
issue:https://github.com/milvus-io/milvus/issues/42872

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-06-21 13:24:39 +08:00
cai.zhang 8f8ffe9989
fix: Reduce task slot for standalone to 1/4 of normal datanode (#42808)
issue: #42129

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-20 16:38:46 +08:00
Spade A e15926b40c
enhance: optimize tantivy cargo config (#42880)
fix: https://github.com/milvus-io/milvus/issues/42879

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-06-20 16:17:49 +08:00
aoiasd 43a9f7a79e
enhance: Add and run rust format command in makefile (#42807)
relate: https://github.com/milvus-io/milvus/issues/42806

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-20 10:22:39 +08:00
Zhen Ye 6798fdc3b3
fix: rocksmq cannot graceful stop (#42841)
issue: #40532

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-19 19:38:39 +08:00
congqixia 74ea57bac1
enhance: Remove unused load field check from proxy (#42816)
Related to #42489

Since load list works as hint after cachelayer implemented, the related
check logic could be removed to keep code logic clean.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-19 19:34:47 +08:00
Zhen Ye fadc053d7a
fix: filter new proxy when initializing proxy session at timeticksync (#42831)
issue: #40532

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-19 16:44:40 +08:00
Zhen Ye 2fd8f910b0
fix: data duplicated when msgdispatcher make splitting (#42827)
issue: #41570

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-19 16:32:39 +08:00
junjiejiangjjj 9865d672f7
fix: Model rerank supports Truncate (#42643)
https://github.com/milvus-io/milvus/issues/42632

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-06-19 15:02:41 +08:00
sthuang 4a0a2441f2
enhance: [StorageV2] field id as meta path for wide column (#42787)
related: #39173

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-19 15:00:38 +08:00
congqixia 4ba177cd2c
enhance: [StorageV2] Handle narrow column group resource estimation (#42842)
Related to #39173

In storage v2, "narrow" column group could have group id not mapped
schema, which causing loading fails or resource estimation result
inaccurate.

This PR handles this case by mapping binlog from index instead of vice
versa.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-19 14:44:39 +08:00
wei liu bf5fde1431
fix: Prevent delegator unserviceable due to shard leader change (#42689)
issue: #42098 #42404
Fix critical issue where concurrent balance segment and balance channel
operations cause delegator view inconsistency. When shard leader
switches between load and release phases of segment balance, it results
in loading segments on old delegator but releasing on new delegator,
making the new delegator unserviceable.

The root cause is that balance segment modifies delegator views, and if
these modifications happen on different delegators due to leader change,
it corrupts the delegator state and affects query availability.

Changes include:
- Add shardLeaderID field to SegmentTask to track delegator for load
- Record shard leader ID during segment loading in move operations
- Skip release if shard leader changed from the one used for loading
- Add comprehensive unit tests for leader change scenarios

This ensures balance segment operations are atomic on single delegator,
preventing view corruption and maintaining delegator serviceability.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-19 12:10:38 +08:00
Spade A e2c85eec81
fix: load stats index based on mmap config (#42788)
ref https://github.com/milvus-io/milvus/issues/42626

This PR makes text match index and json key stats index be loaded based
on mmap config.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-06-19 10:10:39 +08:00
aoiasd d49989345b
enhance: forbid regex filter clone regex for each streamer (#42781)
Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-18 16:10:39 +08:00
cai.zhang d122e6d1e2
enhance: Make Web UI toggleable via config (#42814)
issue: #42813

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-18 13:02:38 +08:00
Bingyi Sun 6bebb68727
fix: Return all targets segments in ListLoadedSegments (#42728)
issue: https://github.com/milvus-io/milvus/issues/42412

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-18 11:20:38 +08:00
Spade A 80f1d707f7
fix: tidy up path for scalar index (#42676)
Ref #42626

This path tidy up path for scalar index including path for loading index
from remote storage and temporary path for buliding index.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-06-18 00:42:38 +08:00
congqixia f9caad95b9
fix: [AddField] Check field empty instead of existence (#42789)
Related to #42773

Growing segment fills all known meta into `InsertRecord` data, which
cause even the field is missing, the field data will still exists.

This PR update the logic while finish loading growing segment to check
field empty or not instead of existence.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-17 17:22:39 +08:00
cai.zhang a9dcd4a380
enhance: ChunkManager is no longer created during datanode initialization (#42791)
issue: #41611

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-17 17:06:38 +08:00
Chun Han 001619aef9
feat: supporing load priority for loading (#42413)
related: #40781

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-06-17 15:22:38 +08:00
aoiasd 4e68c6d222
enhance: add test for new parameters in access log (#42546)
relate: https://github.com/milvus-io/milvus/issues/41801

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-17 11:14:38 +08:00
wei liu 679930bb93
enhance: refine delegator state checking error msg (#42673)
issue: #42661
Add NotStopped() and IsWorking() methods to shardDelegator for better
state management and error handling.

Changes include:
- Add instance state checking methods with proper error messages
- Replace lifetime package calls with delegator instance methods
- Add comprehensive unit tests for state transitions and error cases
- Improve error reporting with channel name for better debugging

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-17 10:40:38 +08:00
congqixia 880915e08b
enhance: Print out-of-date schema ts when returning ErrSchemaMismatch (#42790)
Related to #41858

This PR add log while debugging schema mismatch between pymilvus cache
and proxy schema.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-17 10:38:37 +08:00
zhagnlu 9c31a47c0f
fix:fix arith mod bug for big int (#42699)
#42624

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-06-17 10:36:38 +08:00
zhagnlu a887d81716
fix:reject div or mod by zero for binaryarith expr (#42691)
#42538

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-06-17 10:34:46 +08:00
zhagnlu 2025a2a53c
fix:fix wrong use return error for parse unsupported arith (#42729)
#42061

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-06-17 10:20:37 +08:00
congqixia f01ff57f3f
fix: [StorageV2] Use correct offset filling null bitmap (#42774)
Related to #39173

`null_bitmap_data()` returns raw pointer of null bitmap of Array. While
after slicing, this bitmap is not rewritten due to zero copy
implementation, so the current start pos maybe non-zero while
FillFieldData generating column `valid_data` array.

This PR add `offset` param for `FillFieldData` method, and force all
invocation pass correct offset of `null_bitmap_data` ptr.

Also update milvus-storage commit fixing reader failed to return data
when buffer size smaller than row group size problem.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-17 10:08:38 +08:00
congqixia 9653ec8d8c
fix: [AddField] Remove load list check on querycoord (#42736)
Related to #42735

Load field list shall work as hint after tiered storage impl, so the
load list compare is meaningless and block load with empty list after
adding a new field.

This PR totally moves the check logic.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-17 09:50:37 +08:00
wei liu 0b4a17c22b
fix: Fix exclude nodes clearing logic position in load balancer retry (#42577)
issue: #42561
Move the exclude nodes clearing logic from ExecuteWithRetry to
selectNode after shard leader cache refresh to ensure proper retry
behavior:
- Remove premature exclude clearing in ExecuteWithRetry that happened
before shard leader cache update
- Add exclude clearing logic in selectNode after refreshing shard leader
cache when all replicas are excluded
- Ensure multiple retries can properly update shard leader cache and
clear exclude list when needed
- Add comprehensive tests for edge cases including empty shard leaders
and mixed serviceable node scenarios

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-17 08:15:24 +08:00
sthuang ed5dbf3eaa
enhance: [StorageV2] sync separate vector datatype into its own column group (#42638)
related: #39173

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-16 11:48:37 +08:00
zhagnlu d35c33da9f
fix: fix wrong assgin to chunk object (#42672)
#39173

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-06-15 21:18:37 +08:00
aoiasd 201e980d3d
fix: flow graph should free function resource after all node close (#42731)
relate: https://github.com/milvus-io/milvus/issues/42730

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-13 22:14:37 +08:00
yihao.dai 9acba25fad
enhance: Replace pointer-based map key with id in garbage collector (#42647)
issue: https://github.com/milvus-io/milvus/issues/42592

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-06-13 20:50:36 +08:00
congqixia ef8829c5bc
fix: [AddField] Skip missing nullable field in insertCodec (#42724)
Related to #42723

Previous PR #42684 permit insert msg transformation but insertCodec did
not adapt the same skip logic, whic causes panicking.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-13 19:56:36 +08:00
Bingyi Sun 1bf960b1a8
enhance: Check loaded segments before gc (#42639)
issue: https://github.com/milvus-io/milvus/issues/42412

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-13 17:44:38 +08:00
Zhen Ye 1f66b650e9
fix: pulsar cannot work properly if backlog exceed (#42653)
issue: #42649

- the sync operation of different pchannel is concurrent now.
- add a option to notify the backlog clear automatically.
- make pulsar walimpls can be recovered from backlog exceed.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-13 14:28:37 +08:00
wei liu 78c39edbce
fix: Fix potential panic when DeleteCheckpoint is nil (#42664)
issue: #42663
Fix panic issue when processing VchannelInfo messages from older
coordinator versions that don't have DeleteCheckpoint field.

Changes:
- Add null safety check for DeleteCheckpoint before accessing methods
- Maintain backward compatibility with legacy message formats
- Improve seek position selection logic for both old and new versions

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-13 14:26:36 +08:00
congqixia cbed31933a
fix: [AddField] Permit missing new nullable field in InsertMsg (#42684)
Related to #41858 #41951 #42084

When insert msg consumer (pipeline/flowgraph) have newer schema than
insertMsg, it have to adapter the insert msg used old schema(missing
newly added field)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-13 13:52:35 +08:00
congqixia d59002d45e
fix: Make controller wait checker worker quit and add nil protection (#42704)
Related to #42702

This patch add wait logic for `CheckerController` and nil check for
channel checker in case of panicking during server/testcase stop
procedure

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-13 13:20:35 +08:00
Zhen Ye ca48603f35
fix: msg dispatcher lost data at streaming service (#42670)
issue: #41570

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-13 11:54:36 +08:00
Spade A 9873e0ee78
fix: fix text match index / json key stats index leak when segment released (#42655)
Ref https://github.com/milvus-io/milvus/issues/42626

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-06-13 04:28:37 +08:00
cai.zhang 4ca1a231ad
fix: Add precheck for unsupport datatype cast (#42677)
issue: #42527

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-12 21:14:36 +08:00
congqixia c9bc70f272
fix: [AddField] Use shared_ptr of schema in plan fixing dangling ref (#42693)
Related to #42640

The search/query plan holded a reference to schema, which could be
destructed after schema change. This PR make plan hold a shared ptr to
it fixing dangling reference problem under concurrent read & schema
change.

This PR also remove field binlog check for loading index for old segment
with old schema may have binlog lack.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-12 20:46:36 +08:00
yihao.dai 86876682da
enhance: Enhance import integration tests and logs (#42612)
1. Optimize the import process: skip subsequent steps and mark the task
as complete if the number of imported rows is 0.
2. Improve import integration tests:
 a. Add a test to verify that autoIDs are not duplicated
 b. Add a test for the corner case where all data is deleted
 c. Shorten test execution time
3. Enhance import logging:
 a. Print imported segment information upon completion
 b. Include file name in failure logs

issue: https://github.com/milvus-io/milvus/issues/42488,
https://github.com/milvus-io/milvus/issues/42518

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-06-12 20:02:35 +08:00
Xianhui Lin 98067f5fc6
fix: datacoord stop get stuck After upgrading from 2.5 to 2.6 (#42674)
datacoord stop get stuck After upgrading from 2.5 to 2.6
issue:https://github.com/milvus-io/milvus/issues/42656

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-06-12 16:56:36 +08:00
Spade A 911a8df17c
feat: impl StructArray -- data storage support in segcore (#42406)
Ref https://github.com/milvus-io/milvus/issues/42148
This PR mainly enables segcore to support array of vector (read and
write, but not indexing). Now only float vector as the element type is
supported.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
Signed-off-by: SpadeA-Tang <tangchenjie1210@gmail.com>
2025-06-12 14:38:35 +08:00
cai.zhang 57c60af00d
fix: Unsorted small segments should not be considered as indexed (#42614)
issue: #42143

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-12 14:30:35 +08:00
Buqian Zheng 8511ede5f8
feat: add back queryNode.cache.warmup for compatibility (#42621)
issue: https://github.com/milvus-io/milvus/issues/41435

also make ChunkTranslator to load in parallel

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-06-12 10:56:40 +08:00
Bingyi Sun 6c16d3dbee
enhance: Add bulk api for json data (#42407)
issue: https://github.com/milvus-io/milvus/issues/42409

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-12 10:40:39 +08:00
foxspy 58f9278db7
fix: fix build interim index failures (#42679)
issue: #42028 

W20250522 09:52:55.785657 12779 ChunkedSegmentSealedImpl.cpp:1752]
[SERVER][generate_interim_index][CGO_LOAD][]fail to generate binlog
index, because bad optional access

After the cachelayer is added, num_rows_ can not be obtained before
interim index generated , and an external parameter pass is required

Signed-off-by: foxspy <xianliang.li@zilliz.com>
2025-06-12 05:12:39 +08:00
yihao.dai a72463c619
enhance: Optimize memory usage during garbage collection (#42593)
Defer clone and decompress operations until just before removing from
meta, instead of eagerly applying them to all segments in advance.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-06-11 20:40:39 +08:00
foxspy 9af6c16ea0
fix: add describeIndex timestamp for restful interface (#42104)
issue: #41431

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-06-11 15:26:38 +08:00
yihao.dai e6da4a64b5
fix: Pre-check import message to prevent pipeline block indefinitely (#42415)
Pre-check import message to prevent pipeline block indefinitely.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Co-authored-by: chyezh <chyezh@outlook.com>
2025-06-11 13:40:38 +08:00
wei liu e7c0a6ffbb
enhance: Refine QueryNode task parallelism based on CPU core count (#42166)
issue: #42165
Implement dynamic task execution capacity calculation based on QueryNode
CPU core count instead of static configuration for better resource
utilization.

Changes include:
- Add CpuCoreNum() method and WithCpuCoreNum() option to NodeInfo
- Implement GetTaskExecutionCap() for dynamic capacity calculation
- Add QueryNodeTaskParallelismFactor parameter for tuning
- Update proto definition to include cpu_core_num field
- Add unit tests for new functionality

This allows QueryCoord to automatically adjust task parallelism based on
actual hardware resources.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-11 13:20:35 +08:00
congqixia 499e9a0a73
fix: [AddField] Use corresponding datatype for int8/int16 def val (#42633)
Related to #42629

This PR handles converting default value to int8/int18 scalar with int32
default value definition

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-11 11:54:34 +08:00
Xianhui Lin d5c41acec1
fix: compatibility with old sessions upgrade from 2.5 to 2.6 in standalone mode (#42645)
compatibility with old sessions upgrade from 2.5 to 2.6 in standalone
mode
issue:https://github.com/milvus-io/milvus/issues/42602

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-06-11 10:58:35 +08:00
Zhen Ye 43f0c56ce7
fix: limit the concurency of zstd compression and decrease the memory usage of binlog generation (#42630)
issue: #42028

- limit the concurrency of zstd compression.
- zstd.go modified from
`github.com/apache/arrow/go/v17/parquet/compress/ztsd.go`
- may be related to #42129

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-11 09:06:34 +08:00
Bingyi Sun fbf5cb4e62
feat: Add json flat index (#39917)
issue: https://github.com/milvus-io/milvus/issues/35528

This PR introduces a JSON flat index that allows indexing JSON fields
and dynamic fields in the same way as other field types.

In a previous PR (#36750), we implemented a JSON index that requires
specifying a JSON path and casting a type. The only distinction lies in
the json_cast_type parameter. When json_cast_type is set to JSON type,
Milvus automatically creates a JSON flat index.

For details on how Tantivy interprets JSON data, refer to the [tantivy
documentation](https://github.com/quickwit-oss/tantivy/blob/main/doc/src/json.md#pitfalls-limitation-and-corner-cases).

Limitations
Array handling: Arrays do not function as nested objects. See the
[limitations
section](https://github.com/quickwit-oss/tantivy/blob/main/doc/src/json.md#arrays-do-not-work-like-nested-object)
for more details.

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-10 19:14:35 +08:00
XuanYang-cn 83877b9faf
enhance: remove extra get collection (#42042)
Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-06-10 18:34:35 +08:00
junjiejiangjjj f1a4526bac
enhance: refactor rrf and weighted rerank (#42154)
https://github.com/milvus-io/milvus/issues/35856

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-06-10 18:08:35 +08:00
wei liu f3fe117840
fix: Use delete checkpoint to prevent delete record loss in L0 refactoring (#42628)
issue: #39333 #41570
Fix delete record missing issue introduced in PR #39552 L0 refactoring:
- Use delete checkpoint as consume start position when deleteCP <
channelCP
- Add logging when delete checkpoint is used instead of seek position
- Prevent delete record loss when deleteCP is earlier than default
channelCP

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-10 17:34:35 +08:00
yihao.dai ed55b14484
fix: Release data memory after sync task completes (#42627)
Release data memory after sync task completes to prevent datanode oom
during import.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-06-10 16:28:34 +08:00
cqy123456 c9680a5b56
fix: avoid load index or create interim index in ChunkedSegmentSealedImpl::HasRawData() (#42622)
issue: https://github.com/milvus-io/milvus/issues/42526

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-06-10 14:54:34 +08:00
Zhen Ye af0881ee5d
fix: timetick cannot push forward when upgrading (#42567)
issue #42492

- streamingcoord start before old rootcoord.
- streaming balancer will check the node session synchronously to avoid
redundant operation when cluster startup.
- ddl operation will check if streaming enabled, if the streaming is not
enabled, it will use msgstream.
- msgstream will initialize if streaming is not enabled, and stop when
streaming is enabled.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-10 14:52:42 +08:00
cqy123456 317bbfbf81
enhance: milvus support minhash vector and mhjaccard metric (#42036)
issue:
https://github.com/issues/assigned?issue=milvus-io%7Cmilvus%7C41746

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-06-10 14:38:34 +08:00
Bingyi Sun b3ecf77a66
fix: Fix the bug of valid data write corruption (#42556)
issue: https://github.com/milvus-io/milvus/issues/42554

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-10 14:22:34 +08:00
zhagnlu 2861096734
fix: Add explicit move semantics to get_batch_view interface (#42403)
#42401

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-06-10 13:06:35 +08:00
sthuang 9439eaef52
fix: [StorageV2] sync with int8 vector data type core dumped (#42616)
related: https://github.com/milvus-io/milvus/issues/42613, #39173

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-10 11:42:35 +08:00
aoiasd 13330bd466
fix: add concurrency and close protect for bm25 function (#42597)
relate: https://github.com/milvus-io/milvus/issues/42576

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-10 11:36:34 +08:00
sthuang 89c3afb12e
fix: [StorageV2] index/stats task level storage v2 fs (#42191)
related: #39173

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-10 11:06:35 +08:00
aoiasd fd6e2b52ff
enhance: use english name as language name for all type language identifier (#42600)
Set whatlang detect return language name as english name.
Make sure same with lingua.

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-10 10:24:35 +08:00
congqixia a9aaa86193
enhance: [StorageV2] Pass bucket name for compaction readers (#42607)
Related to #39173

Like logic in #41919, storage v2 fs shall use complete paths with
bucketName prefix to be compatible with its definition. This PR fills
bucket name from config when creating reader for compaction tasks.

NOTE: the bucket name shall be read from task params config for
compaction task pooling.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-10 10:20:35 +08:00
congqixia 118684afbb
enhance: [storageV2] Pass nullable converting insertMsg fieldData (#42584)
Related to #39173

`nullable` flag is crucial for serde logic of v2 writer, missing this
flag causes logic bug for v2 nullalbe data.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-10 10:06:34 +08:00
Bingyi Sun ffb2877992
enhance: support auto index type for json index (#42071)
issue: https://github.com/milvus-io/milvus/issues/42070

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-09 21:22:34 +08:00
wei liu 317e7999da
fix: ReleasePartition cause delegator unserviceable. (#42423)
issue: #42098 #42404
related to: ##42009 #41937

Implement new method to handle partition removal from next target
without directly modifying current target.

Changes include:
- Add RemovePartitionFromNextTarget method and deprecate RemovePartition
- Update target_observer to use new method for ReleasePartition
operations
- Add unit tests and mock methods for new functionality

This ensures that all changes to next target will propagates to
delegator's query view.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-09 19:02:34 +08:00
Bingyi Sun 6404e02d99
fix: Check cast type is array for json contains expr (#42184)
issue: https://github.com/milvus-io/milvus/issues/42181

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-09 17:04:33 +08:00
congqixia f1188b6781
enhance: [storagev2] Support partition key isolation index (#42574)
Related to #39173

This patch make storage v2 support partition key isolation index feature

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-09 14:02:33 +08:00
yihao.dai 837349dead
enhance: Adjust default import buffer size (#42541)
Increase insert buffer size from 16MB to 64MB, while keeping delete
buffer size at 16MB.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-06-09 13:02:33 +08:00
sthuang b136f85ca0
fix: storage v2 write mmap file per field per cell (#42180)
Each cell of a field should be written to its own mmap file, rather than
writing all cells of the field into a single mmap file.
related: #39173

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-09 11:48:33 +08:00
aoiasd 6e16653597
fix: update tantivy commit version to fix stemmer panic (#42171)
relate: https://github.com/milvus-io/milvus/issues/42168

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-09 10:34:33 +08:00
Xianhui Lin 7e46fc6618
feat: implement batch commit for JSON Stats (#42494)
implement batch commit for JSON Stats
issue:https://github.com/milvus-io/milvus/issues/41616

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-06-08 19:58:33 +08:00
Buqian Zheng b4d549d96a
fix: pipeline/delegator leak (#42582)
the manager's logging lambda should not capture the pipeline object

this creates a circular reference between the manager and the pipeline
object, making it impossible for both to be GC-ed.

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

Signed-off-by: Buqian Zheng <buqianzheng@Buqians-MacBook-Air.local>
Co-authored-by: Buqian Zheng <buqianzheng@Buqians-MacBook-Air.local>
2025-06-06 22:00:32 +08:00
wei liu 8511881d3f
enhance: Increase search/query retry times on proxy before timeout (#40438)
issue: #39379

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-06 18:12:32 +08:00
congqixia b50c4a7973
enhance: Make segcore thread name set correctly (#42497)
Previous PR: #42017 did not work due to following updated points by this
PR:

- Initialize the `name_map`, which not touched at all before
- Trim the thread name under 15 characters to fit syscall limit

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-06 16:26:32 +08:00
Bingyi Sun cc5ac1c220
enhance: Support cast function for json index (#41949)
issue: #41948

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-06-05 19:42:32 +08:00
zhagnlu 0c4b12565e
fix: fix is null bug for marisa index (#42420)
#42255

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-06-05 16:40:32 +08:00
cai.zhang e299c533be
fix: Just trigger stats task for Flushed segment (#42424)
issue: #42419

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-05 15:42:32 +08:00
aoiasd b1f86f6556
enhance: run analyzer should get database name from grpc context (#42398)
Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-05 14:26:31 +08:00
aoiasd 2eb24fbe7c
fix: analyzer memory leak because function runner not close (#41839)
relate: https://github.com/milvus-io/milvus/issues/41213

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-06-05 14:24:40 +08:00
congqixia 373deba0bd
fix: Pass cluster id tranforming drop task to drop job request (#42531)
Related to #42530

The cluster id is missing when drop worker drop causing redoing task on
report duplicated task error.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-05 13:20:32 +08:00
Zhen Ye 0567f512b3
fix: streamingnode get stucked when stop (#42501)
issue: #42498

- fix: sealed segment cannot be flushed after upgrading
- fix: get mvcc panic when upgrading
- ignore the L0 segment when graceful stop of querynode.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-05 12:22:31 +08:00
Ted Xu 35c17523de
feat: limit search result entries (#42522)
See: #42521

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-06-05 12:08:33 +08:00
cai.zhang 43c99a2c49
fix: Only mark segment compacting for sort stats task (#42516)
issue: #42506

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-04 22:46:32 +08:00
yihao.dai 6fda1f69c8
fix: Fix duplicate autoID between import and insert (#42519)
Remove the unlimited logID mechanism and switch to redundantly
allocating a large number of IDs.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-06-04 19:58:31 +08:00
cai.zhang 5566a85bcc
enhance: Add proxy task queue metrics (#42156)
issue: #42155

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-04 11:26:32 +08:00
Chun Han e9b5d9e8bc
enhance: refine compaction trigger to reduce read/write amplifaction(#41336) (#41728)
related: #41336

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-06-04 11:24:38 +08:00
Zhen Ye 508264f953
fix: querynode upgrade from 2.5 get stucked (#42502)
issue: #42492

- consider the old RO query node (not streaming node) when balancing
channel.
- querynode graceful stop can be done if there's only L0 segment exists.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-04 11:20:30 +08:00
congqixia b76478378a
feat: [Tiered] Make load list work as warmup hint (#42490)
Related to #42489
See also #41435

This PR's main target is to make partial load field list work as caching
layer warmup policy hint. If user specify load field list, the fields
not included in the list shall use `disabled` warmup policy and be able
to lazily loaded if any read op uses them.

The major changes are listed here:
- Pass load list to segcore and creating collection&schema
- Add util functions to check field shall be proactively loaded
- Adapt storage v2 column group, which may lead to hint fail if columns
share same group

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-06-04 10:28:32 +08:00
Zhen Ye fc010e44a8
fix: release memory after pop from heap (#42482)
issue: #42481

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-04 10:00:32 +08:00
sthuang 490827974d
enhance: avoid shutdown sdk api in minio cm destructor (#42459)
related: #39173

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-06-04 09:58:39 +08:00
yihao.dai e0113b375e
fix: Fix sort stats generates large binlogs (#42456)
Remove the hardcoded batchSize of 100,000 and instead trigger a write
every 64MB based on actual data size. This prevents sort stats from
generating excessively large binlog files.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-06-04 09:56:39 +08:00
wei liu aa66072a1c
enhance: Remove inadvertently introduced goccy/go-json dependency (#42146)
Remove the 'goccy/go-json' library, which was inadvertently introduced,
and revert to using the standard internal JSON handling.

Changes include:
- Removed dependency on 'github.com/goccy/go-json' in go.mod and go.sum.
- Replaced import of 'goccy/go-json' with 'internal/json' in
'internal/querycoordv2/task/scheduler.go'.

This correction ensures the project continues to use the intended JSON
processing libraries and avoids unnecessary external dependencies.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-03 17:38:32 +08:00
cqy123456 727f4ec24b
enhance:mmapchunkmanager allocates MmapChunkDescriptor itself (#42150)
issue: https://github.com/milvus-io/milvus/issues/42157

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-06-03 14:42:31 +08:00
wei liu 5a355d1e57
fix: Fix data race in global scheduler test using atomic counters (#42454)
issue: #42457

Replace unsafe ExpectedCalls modification with atomic.Int32 state
tracking to avoid race conditions in concurrent test execution. Changes
include:
- Use atomic counters instead of direct mock ExpectedCalls manipulation
- Add RunAndReturn with atomic state transitions for thread safety
- Remove github.com/samber/lo dependency

This prevents data race when mock framework and test goroutines access
ExpectedCalls concurrently.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-06-03 14:18:30 +08:00
Zhen Ye e479467582
fix: panic when upgrading from old arch (#42422)
issue: #42405

- add delete rows into header when upsert.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-31 22:56:29 +08:00
congqixia cc42d49769
fix: [StorageV2][AddField] Handle lack binlog rows in storage v2 (#42186)
Related to #39173 #39718

In storage v2, the `lack_bin_rows` cannot be used since field id is not
column group id, which will not be matched forever.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-31 02:44:30 +08:00
yihao.dai 297331b2cc
enhance: Add slot and tasks num metrics (#42141)
issue: https://github.com/milvus-io/milvus/issues/41123

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-30 21:52:30 +08:00
wei liu 2669d14ba0
refactor: Remove balance constraints between channel and segment tasks (#42177)
issue: #42176

Remove the mutual exclusion constraints between channel and segment
balance tasks to allow them to run concurrently.

Changes include:
- Remove permitBalanceChannel() and permitBalanceSegment() methods from
RoundRobinBalancer
- Update ChannelLevelScoreBalancer, MultiTargetBalancer,
RowCountBasedBalancer, and ScoreBasedBalancer to remove constraint
checks
- Allow segment balance tasks to proceed even when channel balance tasks
are running
- Update test cases to reflect new behavior where balance tasks no
longer block each other

This change improves the efficiency of load balancing by removing
unnecessary coordination overhead between different types of balance
operations.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-05-30 18:14:25 +08:00
congqixia 6d2ad519b1
enhance:[StorageV2] Adapt local storage & other minor issue (#42167)
Related to #39173

This PR
- Handle storage v2 log path in local storage mode on querynode
- Ignore field info check when append index for loaded sealed segment
when using storage v2

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-30 10:22:29 +08:00
Xiaowei Shi 729d0b666e
enhance: use parsed physical timestamp in metrics (#41784)
issue: https://github.com/milvus-io/milvus/issues/38809
pr: https://github.com/milvus-io/milvus/pull/38810 failed to reopen

Signed-off-by: Xiaowei Shi <shallwe.shih@gmail.com>
2025-05-30 10:20:37 +08:00
Chun Han ed0df38605
enhance: resize high priority wqthreadpool dynamically(#40838) (#41549) (#41929)
related: #40838
pr: https://github.com/milvus-io/milvus/pull/41549

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
2025-05-30 10:18:36 +08:00
Zhen Ye 66cc194ab2
enhance: add partition gc at streaming arch (#42179)
issue: #41976

- make drop partition message as a broadcast message.
- add gc when drop partition message is acked.
- add a call back to handle the broadcast message when ack.
- the ack operation of broadcast message will retry until success.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-29 23:20:30 +08:00
Zhen Ye 4bad293655
enhance: make upgrading from 2.5.x less down time (#42082)
issue: #40532

- start timeticksync at rootcoord if the streaming service is not
available
- stop timeticksync if the streaming service is available
- open a read-only wal if some nodes in cluster is not upgrading to 2.6
- allow to open read-write wal after all nodes in cluster is upgrading
to 2.6

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-29 23:02:29 +08:00
Zhen Ye b94cee2413
fix: growing segment from old arch is not flushed after upgrading (#42164)
issue: #42162

- enhance: add read ahead buffer size issue #42129
- fix: rocksmq consumer's close operation may get stucked
- fix: growing segment from old arch is not flushed after upgrading

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-29 23:00:28 +08:00
wei liu eabb62e3ab
fix: Segment may be released prematurely during balance channel (#42090)
issue: #41143

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-05-29 18:36:35 +08:00
Zhen Ye c7d6e3f19b
fix: data lost when wal balance (#42149)
issue: #42147

- error of sync task should be returned if error is returned to avoid
checkpoint is push forward.
- fix up node id checker of UpdateChannelCheckpoint in streaming.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-29 17:32:29 +08:00
aoiasd 3a74044149
fix: hybird search sub requset not set analyzer name (#41896)
relate: https://github.com/milvus-io/milvus/issues/41213

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-05-29 14:56:28 +08:00
hckex 020d36624c
enhance: Fix typo 'dimesion' to 'dimension' in PreExecute method (#42160)
This PR fixes a minor typo in a log message in the `PreExecute` method
of `internal/datanode/index/task_index.go`.
Corrected "dimesion" to "dimension".

Signed-off-by: hckex <33862757+hckex@users.noreply.github.com>
2025-05-29 12:24:30 +08:00
Buqian Zheng fdf5e05c80
fix: log is_sorted_by_pk_ when loading sealed segment (#42142)
issue: https://github.com/milvus-io/milvus/issues/41993

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-05-29 11:48:29 +08:00
Xianhui Lin 8bbfbd1d54
fix: handle the error and return in mixcoord (#42152)
fix: handle the error and return in mixcoord
issue:https://github.com/milvus-io/milvus/issues/42151

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-05-29 11:40:30 +08:00
aoiasd 2ae4d80120
enhance: support run analyzer by loaded collection field (#42113)
relate: https://github.com/milvus-io/milvus/issues/42094

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-05-29 10:54:30 +08:00
junjiejiangjjj 4202c775ba
feat: Support vllm and tei rerank (#41947)
https://github.com/milvus-io/milvus/issues/35856

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-05-28 19:18:28 +08:00
groot 14563ad2b3
enhance: bulkinsert handles nullable/default (#42127)
issue: https://github.com/milvus-io/milvus/issues/42096,
https://github.com/milvus-io/milvus/issues/42130

Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-05-28 18:02:28 +08:00
yihao.dai 79b51cbb73
fix: Fix task getting stuck after recovery (#42114)
Submit tasks into the global scheduler after recovery.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-28 12:46:28 +08:00
congqixia 08a53c56b1
fix: [AddField] Use metacache schema in embedding node (#42115)
Related to #42084

Embedding node cached schema when created, causing schema mismatch after
schema change. This PR make embeddingNode use schema from metacache,
which will be updated.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-28 11:30:28 +08:00
Xianhui Lin da30e1e4df
fix: pass the ttl duration in the search request for ttl filter (#42122)
fix: pass the TTL duration in the search request for TTL filter
issue:https://github.com/milvus-io/milvus/issues/41959

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-05-28 11:08:29 +08:00
Buqian Zheng 7243c1d0ce
feat: remove async warmup policy (#42123)
issue: https://github.com/milvus-io/milvus/issues/41993

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-05-28 10:30:28 +08:00
cai.zhang 63246c040f
fix: Use locking to ensure the atomicity of dropping segment indexes (#42075)
issue: #41288

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-05-28 10:00:28 +08:00
cqy123456 5fe7015f63
enhance: InterimIndex support more index type and data type (#41021)
issue: https://github.com/milvus-io/milvus/issues/27678
cherry pick from : https://github.com/milvus-io/milvus/pull/39180,
https://github.com/milvus-io/milvus/pull/40429

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-05-28 08:40:28 +08:00
wei liu 54619eaa2c
feat: Implement partial result support on node down (#42009)
issue: https://github.com/milvus-io/milvus/issues/41690
This commit implements partial search result functionality when query
nodes go down, improving system availability during node failures. The
changes include:

- Enhanced load balancing in proxy (lb_policy.go) to handle node
failures with retry support
- Added partial search result capability in querynode delegator and
distribution logic
- Implemented tests for various partial result scenarios when nodes go
down
- Added metrics to track partial search results in querynode_metrics.go
- Updated parameter configuration to support partial result required
data ratio
- Replaced old partial_search_test.go with more comprehensive
partial_result_on_node_down_test.go
- Updated proto definitions and improved retry logic

These changes improve query resilience by returning partial results to
users when some query nodes are unavailable, ensuring that queries don't
completely fail when a portion of data remains accessible.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-05-28 00:12:28 +08:00
yihao.dai 57b58ad778
fix: Fix concurrent l0Compaction and Stats (#42112)
Return `false` in the `Process()` function for `executing` or
`pipelining` state `l0Compaction`. This prevents the `l0Compaction` task
from being removed from the `CompactionInspector`'s executing queue,
thereby avoiding concurrent execution of `l0Compaction` and `Stats`.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-27 20:54:28 +08:00
junjiejiangjjj 0b2ecb7632
fix: Solve clang compilation errors (#42041)
https://github.com/milvus-io/milvus/issues/42040

Signed-off-by: junjiejiangjjj <junjie.jiang@zilliz.com>
2025-05-27 20:32:29 +08:00
congqixia 6d0b15308d
enhance: Take nq into slow query consideration (#42109)
Related to #40756

Large nq will naturally increase query time, which causing lots of slow
log when user NQ numbers are very large.

This PR make slow search counts span per nq (using avg val) to decide
whether one request is slow or not.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-27 19:56:28 +08:00
congqixia 4cab236bca
enhance: [AddField][Nullable] Fill absent nullable field server-side (#42095)
Related to #39718

The absent nullable field shall be filled at server-side in nullable
design. While the implementation here was buggy causing the feature was
not able to serve.

This PR make proxy fill the field data in correct format so that field
data with absent column(s) will be accepted.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-27 18:50:28 +08:00
Xianhui Lin 6a0e182e13
enhance: support TTL expiration with queries returning no results (#42086)
support TTL expiration with queries returning no results
issue:https://github.com/milvus-io/milvus/issues/41959

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-05-27 18:28:27 +08:00
sthuang b9b554676c
fix: storage v2 get field data with correct column group files (#42107)
related: #39173

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-05-27 15:26:28 +08:00
groot c00005bdaa
feat: support to drop properties of field (#41996)
issue: https://github.com/milvus-io/milvus/issues/41990

Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-05-27 14:32:34 +08:00
yihao.dai 59a6eef774
fix: Fix compaction getting stuck (#42087)
Reset `isCompacting` flag after JSONStats and BM25 task finished.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-27 10:26:27 +08:00
hckex a20500b3ed
doc: Fix small typo in internal/datanode/README.md (#42089)
This PR fixes a minor typo in the README file of the datanode module.
Corrected "imformation" to "information".

Signed-off-by: hckex <33862757+hckex@users.noreply.github.com>
2025-05-27 10:16:27 +08:00
aoiasd 0fafb706ba
enhance: add segment bm25 stats local cache (#41775)
relate: https://github.com/milvus-io/milvus/issues/41424

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-05-26 18:44:27 +08:00
cai.zhang 80fe573c76
enhance: Pass the compaction configuration through request parameters (#41979)
issue: #41123

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-05-26 11:52:27 +08:00
Bingyi Sun e9c0756dc6
enhance: return index params for restful api (#42016)
issue: #42015

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-05-26 11:50:28 +08:00
Chun Han d1cfa58a0a
feature: support compact expiry data(#41336) (#42056)
related: #41336

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-05-25 16:46:31 +08:00
yihao.dai 194b492f05
fix: Fix proxy panic at shard client manager (#42025)
issue: https://github.com/milvus-io/milvus/issues/42024

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-23 22:44:26 +08:00
cai.zhang 344d002346
fix: Don't create index for unsorted importing segment when enable stats (#42044)
issue: #41863

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-05-23 20:46:26 +08:00
Xianhui Lin a72492169f
feat: add NotifyDropPartition in mixcoord for droppartition in dc (#42029)
add NotifyDropPartition in mixcoord for droppartition in dc
issue:https://github.com/milvus-io/milvus/issues/41976
https://github.com/milvus-io/milvus/issues/41542

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-05-23 18:32:26 +08:00
Zhen Ye 38c804fb01
fix: more stable recovery graceful closing and stable unittest (#42013)
issue: #41544

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-23 17:52:26 +08:00
XuanYang-cn 252d49d01e
fix: ChannelManager double assignment (#41837)
See also: #41876

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-05-23 14:16:29 +08:00
yihao.dai f71930e8db
enhance: Enhance import context (#42021)
Rename `imeta` to `importMeta` to improve readability, and enhance
import related context usage.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-23 12:58:27 +08:00
yihao.dai 83c9527e70
enhance: Use QuerySlot interface for tasks (#41989)
Use `QuerySlot` rpc instead of `QueryTask` for querying slot.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-23 10:30:28 +08:00
cai.zhang 48419da4d2
fix: Re add json stats trigger (#41967)
issue: #41123

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-05-23 10:02:27 +08:00
presburger e878fe588e
enhance: Set the default GPU version autoindex to use the CAgra index (#41906)
issue:  #41907

Signed-off-by: yusheng.ma <yusheng.ma@zilliz.com>
2025-05-23 01:20:28 +08:00
yihao.dai e04e5b41ca
enhance: Add task version monitoring (#42023)
issue: https://github.com/milvus-io/milvus/issues/41123

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-22 23:24:28 +08:00
congqixia 244aa30076
fix: Lock before reading flusher cp sampling truncate cp (#42019)
Related to #42018

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-22 21:38:28 +08:00
Zhen Ye c9b0748ff9
enhance: add delete rows into delete msg header and more metric (#41952)
issue: #41544

- add delete rows into delete messsage header
- add more insert/delete metrics
- fix non-broadcast message has broadcast header

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-22 20:28:26 +08:00
congqixia 9fb0257bfa
enhance: Set thread name for segcore thread pool (#42017)
Thread name could be helpful when debugging thread explosion issues

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-22 19:06:27 +08:00
congqixia 22ef03b040
fix: [AddField] Expire metacache with rc task timestamp (#42010)
Related to #39718 #41681

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-22 17:20:25 +08:00
Zhen Ye 458ab86894
fix: stop retry if collection not found too much when get recovery from coord (#41980)
issue: #41966

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-22 16:22:24 +08:00
Buqian Zheng 2e3539319d
feat: vector field raw data to mmap by default (#41975)
issue: https://github.com/milvus-io/milvus/issues/41435

should address https://github.com/milvus-io/milvus/issues/41774

this PR also: 
* added caching layer memory overhead metric
* re-enable TextMatch.GrowingLoadData test

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-05-22 11:56:25 +08:00
wei liu 78010262f0
enhance: Optimize shard serviceable mechanism (#41937)
issue: https://github.com/milvus-io/milvus/issues/41690
- Merge leader view and channel management into ChannelDistManager,
allowing a channel to have multiple delegators.
- Improve shard leader switching to ensure a single replica only has one
shard leader per channel. The shard leader handles all resource loading
and query requests.
- Refine the serviceable mechanism: after QC completes loading, sync the
query view to the delegator. The delegator then determines its
serviceable status based on the query view.
- When a delegator encounters forwarding query or deletion failures,
mark the corresponding segment as offline and transition it to an
unserviceable state.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-05-22 11:38:24 +08:00
congqixia f021b3f26a
fix: [AddField] Add protection logic inserting old data into new schema (#41978)
Related to #39718

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-22 11:30:24 +08:00
wei liu dad43a3894
fix: cost metrics collection logic for replica selection (#41965)
issue: #41621
- Deprecate EnableWorkerSQCostMetrics parameter
- Always collect cost metrics from all search and retrieve results
- Update code with comments explaining the changes rationale

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-05-22 10:20:25 +08:00
Buqian Zheng 8a85bc4213
fix: fixes async warmup deadlock (#41995)
issue: https://github.com/milvus-io/milvus/issues/41993

also updated cachinglayer metrics

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-05-22 09:54:24 +08:00
wei liu 4e1208f4f6
enhance: support balancing multiple collections in single trigger (#41875)
issue: #41874
- Optimize balance_checker to support balancing multiple collections
simultaneously
- Add new parameters for segment and channel balancing batch sizes
- Add enableBalanceOnMultipleCollections parameter
- Update tests for balance checker

This change improves resource utilization by allowing the system to
balance multiple collections in a single trigger with configurable batch
sizes.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-05-21 21:38:25 +08:00
SimFG 9f866dd7c3
enhance: add privilege group message types and corresponding tests (#41939)
- issue: #41938

Signed-off-by: SimFG <bang.fu@zilliz.com>
2025-05-21 11:12:28 +08:00
yihao.dai 3f85d376dd
fix: Fix ineffective log level setting in ThreadWatcher (#41886)
issue: https://github.com/milvus-io/milvus/issues/41781

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-20 21:22:24 +08:00
yihao.dai 142bd2fc05
enhance: Pooling for data tasks (#41256)
1. Add global scheduler for datacoord.
2. Define and implement new CreateTask, QueryTask, DropTask interfaces.
3. Refine Import, Compaction, Stats, Index task.

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

Co-authored-by: Cai Zhang <cai.zhang@zilliz.com>
2025-05-20 21:06:24 +08:00
Zhen Ye 59ab274dbe
fix: use flusher and recovery checkpoint together to determine the truncate position (#41934)
issue: #41544

- unify the log field of message
- use the minimum one of flusher and recovery storage checkpoint as the
truncate position

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-20 16:10:24 +08:00
junjiejiangjjj 1cc5fa8be9
fix: Fix rrf score (#41857)
https://github.com/milvus-io/milvus/issues/41835

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-05-20 15:24:24 +08:00
junjiejiangjjj 0bbbf98a5b
enhance: refactor decay rerank (#41778)
https://github.com/milvus-io/milvus/issues/35856
1. Optimizing decay function
2. Since the decay function is larger, the more similar it is, the
smaller the L2/JACCARD/HAMMING metrics scores the more similar they are.
For these metrics, the decay function regenerates new scores.

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-05-20 15:22:24 +08:00
foxspy 3dbad0306a
fix: Add bypass thread pool mode to avoid growing indexes blocking insert/load (#41012)
issue: #40825

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-05-20 14:30:24 +08:00
aoiasd b6f251718c
enhance: support print nq and params for search and query (#41802)
relate: https://github.com/milvus-io/milvus/issues/41801

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-05-20 14:10:23 +08:00
congqixia f2a8330f87
fix: [StorageV2] Use correct group building index (#41925)
Related to #39173 #41534

This pr fixes an issue that building mem index may report datatype not
match error when collection split fields into multiple groups

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-20 13:26:23 +08:00
congqixia a22088a380
enhance: [StorageV2] Make packed reader use correct path (#41919)
Related to #39173

This PR
- Use updated path with bucketName for packedReader
- Update milvus-storage commit to report reader/writer initialization
failure, see also milvus-io/milvus-storage#192

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-20 10:36:23 +08:00
Zhen Ye e4f04fd692
fix: vchannel count of wal balancer is wrong after recovering (#41922)
issue: #40638

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-19 22:14:23 +08:00
yihao.dai 65dd3982d8
fix: Fix ants.Pool goroutine leak (#41892)
1. Release the pool after it is no longer in use.
2. Upgrade ants.Pool to fix the goroutine leak issue (see [PR
#287](https://github.com/panjf2000/ants/pull/287)).

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-19 17:56:22 +08:00
cai.zhang 38ded7364f
fix: Don't create index for unsorted importing segment when enable stats (#41864)
issue: #41863

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-05-19 10:52:23 +08:00
Ted Xu 7660be0993
feat: bulk insert support storage v2 (#41843)
See #39173

---------

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-05-19 10:34:24 +08:00
Zhen Ye 59dff668dc
enhance: schema change without manual flush (#41882)
issue: #39718

- remove the manual flush message from schema change operation
- add flush segment id handle into schema change processes

Signed-off-by: chyezh <chyezh@outlook.com>
Co-authored-by: congqixia <congqi.xia@zilliz.com>
2025-05-19 10:14:22 +08:00
Ted Xu ae32203d3a
fix: support group by with nullable grouping keys (#41797)
See #36264

In this PR:
- Enhanced error handling in parse of grouping field.
- Fixed null handling in reduce tasks in proxy nodes. 
- Updated tests to reflect changes in error handling and data processing
logic.

---------

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-05-17 20:54:22 +08:00
congqixia b8d7045539
enhance: [Add Field] Use consistent schema for single buffer (#41891)
Related to #41873

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-17 19:46:22 +08:00
Zhen Ye a3d5ad135e
fix: recover a dropped collection from wal if create collection message can be seen (#41902)
issue: #41654

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-17 07:38:21 +08:00
congqixia 3bbc0fa560
enhance: [StorageV2] update storage to pass endpoint as-is (#41889)
Related to milvus-io/milvus-storage#190

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-16 18:06:21 +08:00
Bingyi Sun b006d738b2
fix: Fix skip much more rows when moving cursor (#41862)
issue: https://github.com/milvus-io/milvus/issues/41790

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-05-16 16:46:22 +08:00
Buqian Zheng b0260d8676
feat: manual evict cache after built interim index (#41836)
issue: https://github.com/milvus-io/milvus/issues/41435

this PR also makes HasRawData of ChunkedSegmentSealedImpl to return
based on metadata, without needing to load the cache just to answer this
simple question.

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-05-16 16:34:23 +08:00
Zhen Ye d3fff1769e
fix: streaming node panic with when binary size is set as zero (#41879)
issue: #41853

- persist the estimated binary size for insert message into wal.
- add metric to record the total growing rows of channel.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-16 11:12:22 +08:00
yihao.dai 6c1a37fca1
fix: Fix import reader goroutine leak (#41869)
Close the chunk manager's reader after the import completes to prevent
goroutine leaks.

issues: https://github.com/milvus-io/milvus/issues/41868

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-16 10:18:35 +08:00
Zhen Ye ae43230703
enhance: set jemalloc prof disable by default (#41850)
issue: #40730

- add assertion for insert message
- add more buffer for seal notifier

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-15 20:10:23 +08:00
SimFG 9fa50e0b1a
enhance: implement authorization checks for DescribeCollection and DescribeDatabase tasks (#41798)
- issue: #41694

---------

Signed-off-by: SimFG <bang.fu@zilliz.com>
2025-05-15 17:52:23 +08:00
foxspy 1c794be119
enhance: Output index version information in the DescribeIndex interface (#41847)
issue: https://github.com/milvus-io/milvus/issues/41431

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-05-15 14:36:22 +08:00
cai.zhang 9eebb9b464
fix: Collect entites num group by collection instead of partition (#41788)
issue: #41787

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-05-15 12:04:22 +08:00
congqixia a6d09ff4cd
enhance: [StorageV2] fix issues integrating basic RW operations (#41834)
Related to #39173

This PR:
- Upgrade milvus-storage commit to fix filesystem finalized issue
- Add bucket-name as prefix for all fs style access io
- Initial arrow fs on querynodes startup
- Fix timestamp access when loading sealed segment

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-15 09:52:23 +08:00
Buqian Zheng cae0091071
feat: make SkipIndex lazyload (#41826)
issue: https://github.com/milvus-io/milvus/issues/41435

this PR also:

1. fixed the skip index for VARCHAR. before this PR, skip index of
VARCHAR uses the minmax of the entire column as the minmax of chunk 0,
and provides no minmax for other chunks.
2. refactored some skip index loading related code
3. partly fixed a bug in test_expr.cpp

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-05-15 01:30:23 +08:00
Zhen Ye 0a465bb5b7
enhance: use recovery+shardmanager, remove segment assignment interceptor (#41824)
issue: #41544

- add lock interceptor into wal.
- use recovery and shardmanager to replace the original implementation
of segment assignment.
- remove redundant implementation and unittest.
- remove redundant proto definition.
- use 2 streamingnode in e2e.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-14 23:00:23 +08:00
congqixia c45c1fadb2
enhance: [AddField] Keep all binlog when loading (#41809)
Related to #41726 #41736

The load field list blocks the new field from being loaded.

`load_fields` shall work as hint after tiered storage support API to
specifiy this behavior.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-14 17:30:21 +08:00
yihao.dai 36e9e41627
fix: Fix no candidate segments error for small import (#41771)
When autoID is enabled, the preimport task estimates row distribution by
evenly dividing the total row count (numRows) across all vchannels:
`estimatedCount = numRows / vchannelNum`.
However, the actual import task hashes real auto-generated IDs to
determine
the target vchannel. This mismatch can lead to inaccurate row
distribution estimation
in such corner cases:
- Importing 1 row into 2 vchannels:
				• Preimport: 1 / 2 = 0 → both v0 and v1 are estimated to have 0 rows
				• Import: real autoID (e.g., 457975852966809057) hashes to v1
				  → actual result: v0 = 0, v1 = 1

To resolve such corner case, we now allocate at least one segment for
each vchannel
when autoID is enabled, ensuring all vchannels are prepared to receive
data even
if no rows are estimated for them.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-14 15:30:21 +08:00
cai.zhang 4ead8caaba
fix: prevent crash when contains_all/any is used with empty array (#41739)
issue: #41348 

related and optimized by #41347

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Sangho Park <hoyaspark@gmail.com>
2025-05-14 14:32:22 +08:00
yihao.dai 1f5f8a4843
fix: Disable block and mutex profiling on arm to prevent SIGSEGV (#41822)
issue: https://github.com/milvus-io/milvus/issues/41821

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-05-14 10:56:29 +08:00
foxspy 358bc150df
enhance: add force rebuild index configuration (#41473)
issue: #41431

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-05-14 10:52:21 +08:00
congqixia fb612c765c
enhance: [Restful] Add consistency level for query/get API (#41825)
Related to #41805

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-14 10:48:21 +08:00
Zhen Ye 21d6d1669e
fix: wal should be reopen if wal append receive the fence error (#41807)
issue: #41544

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-14 01:02:56 +08:00
Zhen Ye 7beafe99a7
enhance: implement wal garbage collector with truncate api (#41770)
issue: #41544

- add a truncator implementation into wal recovery storage.
- add metrics for recovery storage.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-13 22:08:56 +08:00
congqixia 186a01eef4
fix: [AddField] Broadcast update schema even there is no segment (#41780)
Related to #41744

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-13 16:02:55 +08:00
zhagnlu f094d026f8
fix: add params to ignore config type exception (#41776)
#41707

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-05-13 13:48:56 +08:00
Zhen Ye 61b6ca5b73
enhance: add in mem shard manager (#41749)
issue: #41544

- Implement in-memory shard manager to maintain the shard state at write
ahead.
- Remove all rpc and meta operation at write ahead, make the segment
assignment logic only use wal and memory.
- Refactor global stats management, add node-level flush policy.
- Fix the recovery storage inconsistency bug when graceful close.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-13 12:04:56 +08:00
aoiasd 9166c77a72
fix: bulk insert should use function runner's input field list instead schema's (#41560)
relate: https://github.com/milvus-io/milvus/issues/41213

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-05-12 19:14:56 +08:00
congqixia 476984c53e
fix: [AddField] Use latest schema instead of cached one (#41757)
Related to #41713 #41710

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-12 16:24:56 +08:00
congqixia 1d76afad7c
enhance: Add mutex preventing concurrent plugin.Open (#41761)
Concurrent calling plugin.Open might cause empty pluginpath issue

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-12 15:44:55 +08:00
groot 1574673a8c
enhance: Alter collection description (#41558)
issue: https://github.com/milvus-io/milvus/issues/41557

Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-05-12 14:16:55 +08:00
Zhen Ye e675da76e4
enhance: simplify the proto message, make segment assignment code more clean (#41671)
issue: #41544

- simplify the proto message for flush and create segment.
- simplify the msg handler for flowgraph.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-11 20:49:00 +08:00
Zhen Ye 452d6fb709
fix: write buffer leak if the wal flusher is cancelled when recovery (#41719)
issue: #41715

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-10 09:32:56 +08:00
Buqian Zheng ff5c2770e5
feat: cachinglayer: various improvements (#41546)
issue: https://github.com/milvus-io/milvus/issues/41435

this PR is based on https://github.com/milvus-io/milvus/pull/41436. 

Improvements include:

- Lazy Load support for Storage v1
- Use Low/High watermark to control eviction
- Caching Layer related config changes
- Removed ChunkCache related configs and code in golang
- Add `PinAllCells` helper method to CacheSlot class
- Modified ValueAt, RawAt, PrimitiveRawAt to Bulk version, to reduce
caching layer overhead
- Removed some unclear templated bulk_subscript methods
- CachedSearchIterator to store PinWrapper when searching on
ChunkedColumn, and removed unused contrustor.

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-05-10 09:19:16 +08:00
Zhen Ye d32b802752
fix: remove the max_row_num for segment meta (#41680)
issue: #41544

- remove the estimate logic, so the create segment operation will not
check the collection meta anymore

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-09 20:46:53 +08:00
cai.zhang 15ffd28643
fix: Set worker totalSlot in standalone mode is half of cluster mode (#41730)
issue: #41616, #41732

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-05-09 18:30:58 +08:00
congqixia d791cb0979
enhance: [AddField] Support explicit dynamic output fields (#41717)
Related to #39718

After support add field with dynamic fields enabled, the masked dynamic
field shall be able to return with `$meta["name"]`

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-09 16:46:54 +08:00
Xianhui Lin 2278e9e03f
fix: set quota center metrics configuration before watch (#41706)
fix: set quota center metrics configuration before watch
issue: https://github.com/milvus-io/milvus/issues/35177

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-05-09 14:32:54 +08:00
congqixia bcf94a0754
fix: Remove noexcept from `CacheIndexToDiskInternal` (#41725)
Related to #41219

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-09 14:16:53 +08:00
zhagnlu f674e232b9
fix: GetValueFromConfig return nullopt instead of exception for null value (#41709)
#41707

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-05-09 11:18:53 +08:00
Zhen Ye 16d6af85c3
fix: panic when use kafka/pulsar/wp for standalone (#41683)
issue: #41682

- There's a bug in rocksmq cleanup, #41565 remove the support of nats.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-09 11:16:54 +08:00
Zhen Ye 3dd9a1147b
enhance: add lock interceptor and recoverable txn manager (#41640)
issue: #41544

- add a lock interceptor at vchannel granularity.
- make txn manager recoverable and add FailTxnAtVChannel operation.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-09 11:14:53 +08:00
Zhen Ye 44c0799331
fix: ignore operation when node or cluster not match (#41718)
issue: #41715

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-09 10:48:53 +08:00
Xianhui Lin 26cbc74478
fix: support infix and suffix match types in JsonStats (#41720)
fix: support infix and suffix match types in JsonStats
issue:https://github.com/milvus-io/milvus/issues/41386

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-05-09 10:42:53 +08:00
zhagnlu e3c81ba1cc
enhance: use scan mode for like although inverted index exists (#41325)
#41065

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-05-09 10:36:54 +08:00
SimFG dfd2548c1b
enhance: support more ddl apis to replicate according to cdc (#41678)
- issue: #41677

Signed-off-by: SimFG <bang.fu@zilliz.com>
2025-05-08 20:02:58 +08:00
junjiejiangjjj f337d2989b
enhance : New decay function (#41634)
https://github.com/milvus-io/milvus/issues/35856

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-05-08 17:24:54 +08:00
Zhen Ye 7dca7ef4d0
fix: empty growing segment cannot be recovered by streamingnode (#41666)
issue: #41665

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-08 14:50:53 +08:00
zhagnlu 39e7ad33d7
enhance: add optimize for like expr (#41066)
#41065

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-05-08 14:28:52 +08:00
foxspy e2ddbe4962
feat: add cachinglayer to index (#41653)
issue: #41435

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-05-08 10:12:54 +08:00
congqixia b1f3fe1f07
fix: Use sum of num_rows instead of last one (#41685)
Related to #41656

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-07 19:40:53 +08:00
Divya 3e67024d94
fix: Security Fixes for RESTful APIs (#41136)
Fix for Issue :- #41128

---------

Signed-off-by: Divya <divyaruhil999@gmail.com>
2025-05-07 18:08:54 +08:00
Zhen Ye 00cf93c043
fix: tombstone channel cp should be set as a metric (#41687)
issue: #41686

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-07 15:34:53 +08:00
Zhen Ye 05eb17aebc
fix: wrong error handling when call importv2 (#41664)
issue: #41654

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-07 15:18:52 +08:00
Bingyi Sun 0dee3ccfd7
enhance: Make user specified doc id selectable for tantivy index writer (#41528)
issue: https://github.com/milvus-io/milvus/issues/41527

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-05-07 10:48:53 +08:00
congqixia 18625d7d20
enhance: [AddField] Remove restriction that cannot add field dynamic field enabled (#41642)
Related to #39718

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-05-07 09:58:52 +08:00
Xianhui Lin 3124d6f599
feat: add string ts type in describecollection (#41612)
feat: add string  ts type in describecollection
issue:https://github.com/milvus-io/milvus/issues/39093

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-05-06 14:28:52 +08:00
Bingyi Sun 4c08090687
feat: Add json index support for json contains expr (#41478)
issue: #35528

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-05-06 11:44:52 +08:00
Zhen Ye de8f0af20d
enhance: use dispatcher at delegator when enable streaming (#41266)
issue: #38399

- add an adaptor type to adapt the streaming service client and
msgstream client to reuse the msgdispatcher.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-05-06 01:12:53 +08:00
Buqian Zheng 73bbf4c674
fix: error when lack_binlog_rows = 0 (#41644)
issue: https://github.com/milvus-io/milvus/issues/41643

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-05-04 00:24:56 +08:00
congqixia c482664bf6
fix: [AddField] Add check whether new field is partition key (#41627)
Related to #41622

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-30 16:50:54 +08:00
sthuang e9442f575d
feat: storage v2 seal segment load (#41567)
storage v2 chunked seal segment loading is based on caching layer. A
cell unit in storage v2 is a parquet row group in remote object storage,
containing all fields. Therefore, each field needs a proxy to do related
one field operations.

<img width="965" alt="Screenshot 2025-04-28 at 10 59 30"
src="https://github.com/user-attachments/assets/83e93a10-3b1d-4066-ac17-b996d5650416"
/>

related: #39173

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-04-30 14:22:58 +08:00
SimFG 3bd6268d3c
enhance: Implement OperatePrivilegeV2 message handling and unmarshal support (#41355)
- issue: #41353

Signed-off-by: SimFG <bang.fu@zilliz.com>
2025-04-30 12:02:53 +08:00
sthuang 6c377b6e86
feat: Storage v2 index and stats raw data (#41534)
related: #39173

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-04-30 08:48:54 +08:00
Zhen Ye f1cba24b94
fix: stop worknode concurrently (#41608)
issue: #41445

- make multiple node stop concurrently (otherwise streamingnode stop
will be blocked by querynode).
- change vchannel count updating when collection is dropping.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-29 23:16:53 +08:00
cai.zhang 3037c58771
enhance: DataNode no need to wait mixcoord healthy in stream mode (#41607)
Once it's confirmed that only stream mode will be used, we should remove
the datanode's dependency on mixcoord.
issue: #41611

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-04-29 18:12:53 +08:00
zhagnlu cd60b965c8
enhance: add expr filter ratio monitor params (#41402)
#41401

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-04-29 17:02:54 +08:00
foxspy 1d99f8bd67
enhance: add force rebuild index configuration (#41473)
issue: #41431

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-04-29 16:20:56 +08:00
congqixia f3f8227cd0
enhance: [AddField] Trigger check schema in retrieve as well (#41598)
Related to #39718
Fixes milvus-io/pymilvus#2771

This PR:
- Make AsyncRetrieve task triggers "schema check" logic as well
- Rename `AddField` related methods to align with code standard

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-29 14:10:49 +08:00
Spade A 910f68c986
fix: update tantivy to fix tantivy doc out of order when merge (#41596)
issue: #41597

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-29 13:46:49 +08:00
Spade A f35e8f7420
fix: fix arm64 compile issue (#41593)
issue: https://github.com/milvus-io/milvus/issues/41059,
https://github.com/milvus-io/milvus/issues/41510

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-29 13:19:25 +08:00
yihao.dai 71b14fc32b
enhance: Skip disk quota check for l0 import (#41571)
issue: https://github.com/milvus-io/milvus/issues/41569

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-04-29 10:46:54 +08:00
Zhen Ye 9cb5271027
enhance: remove support of embeded nats mq (#41565)
issue: #41564

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-28 23:06:49 +08:00
junjiejiangjjj bb7df40fc1
feat: Http interface supports rerank (#41486)
https://github.com/milvus-io/milvus/issues/35856

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-04-28 23:02:50 +08:00
Zhen Ye dfbb02a5f7
enhance: make streaming message as a log field for easier coding (#41545)
issue: #41544

- implement message can be logged as a field by zap.
- fix too many slow log for woodpecker.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-28 14:38:42 +08:00
Buqian Zheng 3de904c7ea
feat: add cachinglayer to sealed segment (#41436)
issue: https://github.com/milvus-io/milvus/issues/41435

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-04-28 10:52:40 +08:00
cai.zhang 640f526301
fix: Update current scalar index version to compatible tantivy different versions (#41141)
issue: #40823

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-04-27 20:44:39 +08:00
yihao.dai 16eb5eb921
enhance: Accelerate delete filtering during binlog import (#41551)
Use map for deleteData instead of slice to accelerate delete filtering
during binlog import.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-04-27 18:56:38 +08:00
aoiasd 3892451880
fix: bm25 search failed when avgdl == nan (#41502)
relate: https://github.com/milvus-io/milvus/issues/41490

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-27 17:34:38 +08:00
Chun Han 12cde913b5
fix: fail to get string views due to chunk bound empty loop(#41300) (#41452)
related: #41300

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-04-27 10:40:38 +08:00
Zhen Ye 6a15790799
enhance: add interface for message and fix write ahead buffer (#41470)
issue: #41439

- add IsPersisted and VChannel interface for message
- add WithNotPersisted() for message builder
- fix the persisted time tick lost at write ahead buffer

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-27 10:24:38 +08:00
congqixia c0661f4e9d
enhance: Set `resolve_type_alias` to False to generate `MockMsgHandler` (#41531)
Previously, mockery will resolve message.ImmutableXXXMessage to private
message.specializedImmutableMessage[H, B], which will not be able to
compile.

This PR set generate-mockery-interal `resolve_type_alias` to False,
which is recommented for v3 compatible, to avoid this problem.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-27 10:02:38 +08:00
congqixia b5443ddbd0
enhance: [AddField] Reopen loaded segments after AddField (#41529)
Related to #39718

This PR:
- Add reopen logic for growing & sealed segments
- Lazy reopen when schema version increases
- Add FinishLoad api for loading progress

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-26 08:48:39 +08:00
Buqian Zheng 1c8b9c127d
fix: Make sure segment in ut is destroyed before static MmapManager singleton (#41508)
issue: #41507

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-04-25 18:50:38 +08:00
XuanYang-cn dab39c610b
enhance: remove not inused DDLCodec (#41485)
See also: #39242

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-04-25 17:26:37 +08:00
Zhen Ye 01c0356ed3
fix: make add segment operation in meta idempotent (#41515)
issue: #41514

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-25 16:50:38 +08:00
Xianhui Lin 1a6838b496
fix: json stats add map null check before insert into tantivity (#41505)
json stats add map null check before insert into tantivity. Json stats
index may fail if there is no data
issue:https://github.com/milvus-io/milvus/issues/41494

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-24 21:06:37 +08:00
Zhen Ye a3d621cb5e
fix: remove the concurrent limits for streaming service (#41484)
issue: #41479

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-24 20:36:38 +08:00
Zhen Ye ecfc868dcb
fix: write buffer not unregistered when datasyncservice is gone (#41496)
issue: #41495

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-24 19:38:38 +08:00
junjiejiangjjj e56adc121b
enhance: refactor embedding credentials manager (#41442)
https://github.com/milvus-io/milvus/issues/35856

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-04-24 14:34:38 +08:00
congqixia dbe54c2df8
enhance: [AddField] Resolve conflicts & make WAL ts collection updatets (#41476)
Related to #39718

This PR:
- Use WAL broadcast timestamp as Collection update timestamp
- Remove request_fields size assertion
- Remove proxy schema cache loaded field check & skip related cases
- other minor issues

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-24 12:06:39 +08:00
XuanYang-cn 540456041f
enhance: Remove not inuse binlog iterator (#41359)
See also: #41466

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-04-24 12:04:38 +08:00
Spade A f3d878ab3f
fix: update tantivy for fixing phrase match (#41450)
issue: #41454
https://github.com/zilliztech/tantivy/pull/8 fixes the problem, this PR
update the tantivy.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-24 10:52:37 +08:00
Zhen Ye 5fd47c3c89
fix: mockery too unavailable after upgrade golang version (#41481)
issue: #41291
pr: #41318

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-24 10:46:43 +08:00
junjiejiangjjj f23df95a77
feat : Support decay rerank (#41223)
https://github.com/milvus-io/milvus/issues/35856
#41312

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-04-23 20:48:39 +08:00
aoiasd f52c2909c4
feat: support multi analyzer for bm25 function (#41351)
relate: https://github.com/milvus-io/milvus/issues/41213

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-23 18:22:38 +08:00
congqixia 85ed200529
fix: Save update timestamp in catalog.AlterCollection API (#41468)
Related to #41467

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-23 16:48:37 +08:00
Xianhui Lin 3d4889586d
fix: JsonStats filter by conjunctExpr and improve the task slot calculation logic (#41459)
Optimized JSON filter execution by introducing
ProcessJsonStatsChunkPos() for unified position calculation and
GetNextBatchSize() for better batch processing.
Improved JSON key generation by replacing manual path joining with
milvus::Json::pointer() and adjusted slot size calculation for JSON key
index jobs.
Updated the task slot calculation logic in calculateStatsTaskSlot() to
handle the increased resource needs of JSON key index jobs.
issue: https://github.com/milvus-io/milvus/issues/41378
https://github.com/milvus-io/milvus/issues/41218

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-23 16:30:37 +08:00
aoiasd 655cc7fe06
fix: bm25 stats idf oracle leak (#41425)
relate: https://github.com/milvus-io/milvus/issues/41424

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-23 14:28:37 +08:00
aoiasd a16bd6263b
feat: support more lauguage for build in stop words and add remove punct, regex filter (#41412)
relate: https://github.com/milvus-io/milvus/issues/41213

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-23 11:44:37 +08:00
SimFG 91d40fa558
fix: Update logging context and upgrade dependencies (#41318)
- issue: #41291

---------

Signed-off-by: SimFG <bang.fu@zilliz.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-23 10:52:38 +08:00
aoiasd 11f2fae42e
feat: support extend default dict for jieba tokenizer (#41360)
relate: https://github.com/milvus-io/milvus/issues/41213

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-22 20:34:37 +08:00
congqixia 481938297c
enhance: [AddField] Use next field id instead of global allocation (#41440)
Related to #39718

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-22 17:14:37 +08:00
congqixia 6f4e0d8e38
enhance: [AddField] Use schema update ts as guarantee ts (#41430)
Related to #39718

Use schema update ts when it's greater than calculated guarantee
timestamp to make sure that all read request using updated schema shall
wait all schema change event processed.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-22 17:12:45 +08:00
congqixia b36c88f3c8
enhance: [AddField] Broadcast schema change via WAL (#41373)
Related to #39718

Add Broadcast logic for collection schema change and notifies:
- Streamnode - Delegator
- Streamnode - Flush component
- QueryNodes via grpc

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-22 16:28:37 +08:00
aoiasd 110c5aaaf4
feat: support icu and language identifier tokenizer (#41214)
relate: https://github.com/milvus-io/milvus/issues/41213

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-22 15:56:37 +08:00
cqy123456 5219d9a723
fix: Inserting null and non-null array at the same time will cause milvus crash when growing mmap open (#41051)
issue: https://github.com/milvus-io/milvus/issues/40981
2.5 pr: https://github.com/milvus-io/milvus/pull/41052

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-04-22 12:26:37 +08:00
Zhen Ye 7f5a9a6046
fix: unstable timeticksync unittest (#41437)
issue: #38399

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-22 10:53:29 +08:00
Zhen Ye 9339bccccc
enhance: move sent first timeticksync, make recovery more easier (#41405)
issue: #38399

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-21 17:18:37 +08:00
aoiasd f166843c5e
enhance: support use lindera tag filter (#40416)
relate: https://github.com/milvus-io/milvus/issues/39659

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-21 15:56:36 +08:00
Xianhui Lin c5428c12eb
feat: Add support for modifying max capacity of array fields (#41404)
feat: Add support for modifying max capacity of array fields

This commit adds support for modifying the max capacity of array fields
in the `alterCollectionFieldTask` function. It checks if the field is an
array type and then validates and updates the max capacity value. This
change improves the flexibility of array fields in the collection.

Issue: https://github.com/milvus-io/milvus/issues/41363

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-21 15:52:37 +08:00
sparknack 8ccb875e41
enhance: add simde package (#40943)
issue: #40942

Add simde package, which can make porting SIMD code to other
architectures much easier.

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-04-21 12:18:40 +08:00
Spade A 5b1430f27e
enhance: tantivy collector set bitset directly (#39748)
fix: #39755

The following shows a simple benchmark where insert 1M docs where all
rows are "hello", the latency is segcore level, CPU is 9900K:
master: 2.62ms
this PR: 2.11ms

bench mark code:

```
TEST(TextMatch, TestPerf) {
    auto schema = GenTestSchema({}, true);
    auto seg = CreateSealedSegment(schema, empty_index_meta);
    int64_t N = 1000000;
    uint64_t seed = 19190504;
    auto raw_data = DataGen(schema, N, seed);
    auto str_col = raw_data.raw_->mutable_fields_data()
                       ->at(1)
                       .mutable_scalars()
                       ->mutable_string_data()
                       ->mutable_data();
    for (int64_t i = 0; i < N - 1; i++) {
        str_col->at(i) = "hello";
    }
    SealedLoadFieldData(raw_data, *seg);
    seg->CreateTextIndex(FieldId(101));

    auto now = std::chrono::high_resolution_clock::now();
    auto expr = GetMatchExpr(schema, "hello", OpType::TextMatch);
    auto final = ExecuteQueryExpr(expr, seg.get(), N, MAX_TIMESTAMP);
    auto end = std::chrono::high_resolution_clock::now();
    auto duration =
        std::chrono::duration_cast<std::chrono::microseconds>(end - now);
    std::cout << "TextMatch query time: " << duration.count() << "ms"
              << std::endl;
}
```

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-20 23:02:41 +08:00
Chun Han 016920b023
fix: solve incompitable problem for none-encoding index(#40838) (#41369)
related: #40838

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-04-20 22:56:44 +08:00
Zhen Ye c4a41cc32b
fix: add node id check to avoid double flush at most time (#41236)
issue: #41028

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-20 22:44:38 +08:00
Zhen Ye ef4923e66b
fix: catchup scan never done if wal truncate (#41345)
issue: #41062

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-20 22:40:37 +08:00
Zhen Ye 78fca7e88d
fix: transaction should retry if transaction is expired (#41379)
issue: #41248

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-20 22:38:36 +08:00
tinswzy 6fa68c1f16
enhance: Support Woodpecker as a WAL storage option for Milvus (#41095)
#40916 Support Woodpecker as a WAL storage option for Milvus

Signed-off-by: tinswzy <zhenyuan.wei@zilliz.com>
2025-04-20 22:22:42 +08:00
Zhen Ye c893344289
fix: close of wal is block when recovery (#41326)
issue: #41307

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-18 16:14:35 +08:00
Xianhui Lin c43f8f7944
feat: Ignore reporting index metrics for non-existent indexes (#41294)
feat: Ignore reporting index metrics for non-existent indexes

Remove the reporting of index metrics for non-existent indexes in the
`getCollectionMetrics` function. This change improves the code by
skipping unnecessary operations and reduces log noise.
issue: https://github.com/milvus-io/milvus/issues/41280

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-18 10:36:36 +08:00
Ted Xu d50781c8cc
enhance: support nullable group by keys (#41313)
See #36264

---------

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-04-18 10:08:34 +08:00
Spade A 62293cb582
fix: revert batch add (#41374)
issue: #41375

todo: to fix the problems fixed in the issue.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-17 22:32:38 +08:00
Bingyi Sun 4552dd4b23
fix: Fix json index does not work for string filter (#41382)
issue: #35528

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-04-17 20:10:39 +08:00
Xiaowei Shi 1a35374672
fix: correct wrong querynode metric labels (#41344)
issue: https://github.com/milvus-io/milvus/issues/41343

Signed-off-by: Xiaowei Shi <shallwe.shih@gmail.com>
2025-04-16 21:32:33 +08:00
cai.zhang 5fd8a196f6
fix: Fix panic with nil pointer dereference when get indexed segment (#41297)
issue: #41288

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-04-16 20:54:00 +08:00
Xianhui Lin deb610e5d3
fix: update MixCoord registration in MilvusRoles (#41337)
enhance: update MixCoord registration in MilvusRoles

The `runMixCoord` function in `MilvusRoles` was updated to use the
`RegisterMixCoord` function from the `rootcoord_metrics` package instead
of `RegisterRootCoord`. This change aligns with the recent modifications
made to the `rootcoord_metrics` package.
issue:https://github.com/milvus-io/milvus/issues/41338

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-16 19:49:54 +08:00
박상호 4be6d0e967
fix: skip dim check for non-vector fields in PreCheck (#41287) (#41289)
## What this PR does

This PR fixes an issue where the `PreCheck` function in DataCoord logs
unnecessary warnings
when attempting to retrieve 'dim' from non-vector fields.

The change adds a check to only call `GetDimFromParams` when the field
type is a vector type.

## Related issue

Fixes #41287

---------

Signed-off-by: 박상호 <sangho@rapportlabs.kr>
Signed-off-by: Sangho Park <hoyaspark@gmail.com>
2025-04-16 17:52:32 +08:00
Xiaowei Shi a6606ce9c6
fix: check PreCreatedTopic first in shard number validation (#41274)
issue : https://github.com/milvus-io/milvus/issues/41271

Signed-off-by: Xiaowei Shi <shallwe.shih@gmail.com>
2025-04-16 17:38:34 +08:00
sthuang e46e3a1708
enhance: optimize error log message for list policy (#41251)
related: #41250

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-04-16 17:16:32 +08:00
sthuang 1f1c836fb9
feat: Storage v2 growing segment load (#41001)
support parallel loading sealed and growing segments with storage v2
format by async reading row groups.
related: #39173

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-04-16 17:14:33 +08:00
Spade A 70d13dcf61
enhance: update tantivy for removing "doc_id" fast field (#41198)
Issue: #41210

After https://github.com/zilliztech/tantivy/pull/5, we can provide
milvus row id directly to tantivy rather than record it in the fast
field "doc_id".
So rather than search tantivy doc id and then get milvus row id from
"doc_id", now, the searched tantivy doc id is the milvus row id,
eliminating the expensive acquiring row id phase.

The following shows a simple benchmark where insert **1M** docs where
all rows are "hello", the latency is **segcore** level, CPU is 9900K:

![image](https://github.com/user-attachments/assets/d8e72134-56b5-430b-8628-36c3bed8eaad)
**The latency is 2.02 and 2.1 times respectively.**

bench mark code:
```
TEST(TextMatch, TestPerf) {
    auto schema = GenTestSchema({}, true);
    auto seg = CreateSealedSegment(schema, empty_index_meta);
    int64_t N = 1000000;
    uint64_t seed = 19190504;
    auto raw_data = DataGen(schema, N, seed);
    auto str_col = raw_data.raw_->mutable_fields_data()
                       ->at(1)
                       .mutable_scalars()
                       ->mutable_string_data()
                       ->mutable_data();
    for (int64_t i = 0; i < N - 1; i++) {
        str_col->at(i) = "hello";
    }
    SealedLoadFieldData(raw_data, *seg);
    seg->CreateTextIndex(FieldId(101));

    auto now = std::chrono::high_resolution_clock::now();
    auto expr = GetMatchExpr(schema, "hello", OpType::TextMatch);
    auto final = ExecuteQueryExpr(expr, seg.get(), N, MAX_TIMESTAMP);
    auto end = std::chrono::high_resolution_clock::now();
    auto duration =
        std::chrono::duration_cast<std::chrono::microseconds>(end - now);
    std::cout << "TextMatch query time: " << duration.count() << "ms"
              << std::endl;
}
```

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-15 20:20:32 +08:00
Bingyi Sun a953eaeaf0
enhance: support binary range expression for json path index (#41025)
issue: #35528

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-04-15 19:32:33 +08:00
congqixia 1d564a2d95
fix: Make `TestScannerAdaptorReadError` stable (#41303)
Related to #41302

Previously wait for 200 milliseconds could cause unsable behavior of
this unittest. This PR make unittest wait for certain function call
instead of wait for some time.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-15 14:54:34 +08:00
congqixia a53f3024cf
fix: Add save field schema log for kv_catalog.AlterCollection (#41242)
Related to #41241

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-15 12:14:32 +08:00
yihao.dai dccfc69660
enhance: Get compaction params from request (#41125)
Make DataNode use compaction parameters from request instead of
configuration.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-04-15 10:28:53 +08:00
cai.zhang bc11feae74
fix: Close client before remove worker client (#41253)
issue: #41252

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-04-15 10:26:31 +08:00
Xianhui Lin 3963fc818f
fix:Add debug memory freeing in sortStats (#41284)
issue: https://github.com/milvus-io/milvus/issues/41218

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-15 09:56:29 +08:00
Xianhui Lin 23f9226250
fix: Initialize streaming coordinator during mixCoord initialization (#41283)
relater-pr: https://github.com/milvus-io/milvus/pull/41006
issue: https://github.com/milvus-io/milvus/issues/41282

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-15 09:44:30 +08:00
Chun Han 59b14d38f5
enhance: Optimize index format for improved load performance(#40838) (#40839)
related: https://github.com/milvus-io/milvus/issues/40838

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-04-15 03:10:30 +08:00
Spade A 736512a59e
fix: change log info to debug for collection ref (#41267)
issue: #41268

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-14 15:16:30 +08:00
Bingyi Sun bf617115ca
enhance: Remove single chunk segment related codes (#39249)
https://github.com/milvus-io/milvus/issues/39112

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-04-11 18:56:29 +08:00
congqixia 154a2a68e0
enhance: Fill dbname for AddCollectionFieldRequest (#41237)
Related to #39718

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-11 18:54:29 +08:00
Xianhui Lin f9febe3bae
enhance: Merge RootCoord, DataCoord And QueryCoord into MixCoord (#41006)
Merge RootCoord, DataCoord And QueryCoord into MixCoord
Make Session into one
issue : https://github.com/milvus-io/milvus/issues/37764

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-11 16:36:30 +08:00
Spade A 9ce3e3cb44
enhance: add documents in batch for json key stats (#41228)
issue: https://github.com/milvus-io/milvus/issues/40897

After this, the document add operations scheduling duration is decreased
roughly from 6s to 0.9s for the case in the issue.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-11 14:08:26 +08:00
Bingyi Sun b9b8419cbf
fix: Use int32 when creating array index for element type int8/int16 (#41185)
issue: #41172
Elements with type int8 or int16 in Array is encoded using int32, so we
should parse it as int32 when creating index.

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-04-11 13:18:25 +08:00
Xianhui Lin 144911aec6
fix: CreateStatsRequest change storage_version to 25 consistent with 2.5 (#41217)
fix: CreateStatsRequest change storage_version to 25 consistent with 2.5
relate-pr:https://github.com/milvus-io/milvus/pull/38039
issue: https://github.com/milvus-io/milvus/issues/36995

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-11 11:16:43 +08:00
Sungyun Hur 7d946af00f
fix: correct typo `kvmetestore` -> `kvmetastore` (#40965)
Fixes a minor typo by replacing `kvmetestore` with `kvmetastore`.

Signed-off-by: lambert <lambert@daangn.com>
2025-04-11 11:13:35 +08:00
XuanYang-cn e7a53da025
enhance: remove not inused util/* in datanode (#41177)
See also: #41229

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-04-11 10:34:29 +08:00
foxspy 17e10beba0
fix: avoid segmentation faults caused by retrieving empty vector datasets (#40545)
issue: #40544

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-04-10 20:16:29 +08:00
Zhen Ye 224728c2d2
fix: catchup cannot work if using StartAfter (#41201)
issue: #41062

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-10 19:04:27 +08:00
XuanYang-cn 793fdeafe1
enhance: Refine logs in compaction trigger (#41171)
See also: #41118

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-04-10 18:08:26 +08:00
congqixia 486141cc12
enhance: [Restful] Make default timeout configurable (#41211)
The restful API default timeout was hard-coded. This PR make this
timeout value configurable via paramtable.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-10 16:14:28 +08:00
wei liu a839d94c9e
fix: balance checker may enter infinite normal balance loop after balance suspension (#41195)
issue: #41194
- Refactor hasUnbalancedCollection flag handling to function scope
- Ensure tracking sets clearance when no balance needed
- Add deferred cleanup for both normal/stopping balance paths
- Add unit tests for collection tracking scenarios

The changes ensure tracking sets (normalBalanceCollectionsCurrentRound
and stoppingBalanceCollectionsCurrentRound) are properly cleared when:
- All collections in current round are balanced
- Balance checks return early due to unready targets
- Balance feature flags are disabled

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-04-10 15:22:29 +08:00
Xianhui Lin 3bc24c264f
enhance: Add json key inverted index in stats for optimization (#38039)
Add json key inverted index in stats for optimization
https://github.com/milvus-io/milvus/issues/36995

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-04-10 15:20:28 +08:00
SimFG a308d2c886
fix: get replicate channel position (#41188)
- issue: #41187

Signed-off-by: SimFG <bang.fu@zilliz.com>
2025-04-10 15:14:28 +08:00
cai.zhang 6f4dc8dda2
fix: Revert add a sign (positive or negative) to constants (#41191)
issue: #41174

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-04-10 14:54:28 +08:00
congqixia b593bfd9a5
fix: [RESTFUL] Return error when writer body closed (#41183)
Related to #41181

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-10 14:34:28 +08:00
sthuang 0d45b24599
fix: show collections support custom privilege groups granted objects (#41203)
related: https://github.com/milvus-io/milvus/issues/41200

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-04-10 12:12:25 +08:00
Spade A e9fa30f462
fix: remove single segment logic in V7 (#41159)
Ref: https://github.com/milvus-io/milvus/issues/40823

It does not make any sense to create single segment tantivy index for
old version such as 2.4 by using tantivy V7.
So, clean the relevant code.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-09 19:54:27 +08:00