Commit Graph

11128 Commits (master)

Author SHA1 Message Date
XuanYang-cn 3160f41821
enhance: [cmek]Merge cipher.yml with hook.yml (#44118)
See also: #40321

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-08-29 18:37:51 +08:00
wei liu 16af4e230a
fix: Prevent panic in upsert due to missing nullable fields [Proxy] (#44070)
issue: #43980
Fixes a panic that occurred when a partial update was converted to an
insert due to a non-existent primary key. The panic was caused by
missing nullable fields that were not provided in the original partial
update request.

The upsert pre-execution logic is refactored to handle this correctly:
- Explicitly splits upsert data into 'insert' and 'update' batches.
- Automatically generates data for missing nullable or default-value
fields during inserts, preventing the panic.
- Enhances `typeutil.UpdateFieldData` to support different source and
destination indexes for flexible data merging.
- Adds comprehensive unit tests for mixed upsert, pure insert, and pure
update scenarios.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-29 18:33:51 +08:00
cai.zhang c16296a53f
fix: Handle compaction retry state (#44119)
issue: #43776

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-29 13:31:51 +08:00
wei liu d84c4c580a
enhance: [DataCoord] Remove full-collection index work from metrics (#43859)
issue: #43858

- Remove full-collection index handling in getCollectionMetrics
- Avoid heavy metadata scans and RPC calls during metrics
- Reduce latency and CPU/memory usage on large datasets
- No functional change to metrics semantics

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-29 12:05:50 +08:00
sparknack 70c8114e85
enhance: cachinglayer: resource management for segment loading (#43846)
issue: #41435

---------

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-08-29 11:37:50 +08:00
Zhen Ye 7b04107863
fix: unrecoverable if lease expire when standby mode (#44112)
issue: #44111

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-29 10:47:51 +08:00
Zhen Ye 23085ae437
fix: use query node label check if streamingnode (#44099)
issue: #44014

- Because the session of querynode and streamingnode is different.
- So when streamingnode session down first, a streaming query node will
be treated as querynode.
- Use label but not streaming node session to fix it.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-29 10:45:59 +08:00
Buqian Zheng 6b22661c06
fix: use tbb::concurrent_unordered_map for ChunkedSegmentSealedImpl::fields_ (#44084)
issue: https://github.com/milvus-io/milvus/issues/44078

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-08-29 10:01:51 +08:00
cqy123456 844caf5cfe
enhance: estimate the size of interim index (#44104)
issue: #41435

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-08-28 19:37:51 +08:00
congqixia ba88cfa7a9
enhance: Add unified GRPC latency metrics in inteceptor (#44089)
Related to #43966

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-28 09:53:51 +08:00
cai.zhang eddf188452
fix: Using bucket name in storage config for bulk writer v2 (#44083)
issue: #44082

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-27 23:47:51 +08:00
congqixia e3b3502287
fix: Use correct regex for cppcheck (#44077)
Related to #44076

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-27 20:57:50 +08:00
Buqian Zheng 6420d72391
enhance: print as storage size unit MB with 2 digits only, so the log is easier to read (#44085)
issue: https://github.com/milvus-io/milvus/issues/41435

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-08-27 19:47:50 +08:00
cai.zhang 7f470e6bd3
fix: Fix retry state with palyload is not nil (#44068)
issue: #43776

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-27 18:11:49 +08:00
marcelo-cjl e13e19cd2c
enhance: add sparse_u32_f32 data type for sparse vertor (#43974)
issue: #43973

Signed-off-by: marcelo.chen <marcelo.chen@zilliz.com>
2025-08-27 16:47:50 +08:00
Chun Han da156981c6
feat: milvus support posix-compatible mode(milvus-io#43942) (#43944)
related: #43942

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-08-27 16:29:50 +08:00
XuanYang-cn 09b29a88aa
enhance: Remove not inused allocator (#43821)
See also: #44039

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-08-27 14:31:50 +08:00
congqixia d3fa305785
enhance: Add grpc metadata header for client request time (#44059)
Related to #44058

This PR:
- Add common grpc metadata key for client request time
- Add gosdk & milvus inteceptor related logic for this attribute
- Bump go sdk version

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-27 14:27:49 +08:00
XuanYang-cn 37a447d166
feat: Add CMEK cipher plugin (#43722)
1. Enable Milvus to read cipher configs
2. Enable cipher plugin in binlog reader and writer
3. Add a testCipher for unittests
4. Support pooling for datanode
5. Add encryption in storagev2

See also: #40321 
Signed-off-by: yangxuan <xuan.yang@zilliz.com>

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-08-27 11:15:52 +08:00
groot 55b24b7a78
fix: Hide sensitive items for restful get configs (#44057)
issue:https://github.com/milvus-io/milvus/issues/44065

Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-08-27 11:09:52 +08:00
aoiasd 208a345a3d
enhance: package analyzer code in Go and fix named analyzer as tokenizer (#43694)
relate: https://github.com/milvus-io/milvus/issues/43687

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-08-27 10:59:52 +08:00
Spade A 90a7e63665
enhance: collect doc_id from posting list directly for text match (#43899)
issue: https://github.com/milvus-io/milvus/issues/43898

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-08-27 10:39:52 +08:00
aoiasd e205c30f7d
fix: boost panic if search return empty result (#44042)
relate: https://github.com/milvus-io/milvus/issues/44041
Skip rescore node if no valid offsets.

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-08-27 05:01:52 +08:00
Spade A 8456f824be
feat: impl StructArray -- miscellaneous staffs for struct array (#43960)
Ref https://github.com/milvus-io/milvus/issues/42148

1. enable storage v2
2. implement some missing staffs
3. fix some bugs and add tests

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-08-26 21:35:53 +08:00
Zhen Ye 5bdc593b8a
enhance: use v0.15.1 official pulsar client and add logging for pulsar client (#43913)
issue: #43785

- pulsar client will print log into milvus logger now.
- pulsar client open the metric by default.
- upgrade the pulsar client to v0.15.1, and use offical repo.
- the fixing of milvus-io/pulsar-client-go is already covered by
official v0.15.1.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-26 16:45:53 +08:00
Tianx c0d62268ac
feat: add timesatmptz data type (#44005)
issue: https://github.com/milvus-io/milvus/issues/27467
>
https://github.com/milvus-io/milvus/issues/27467#issuecomment-3092211420
> * [x]  M1 Create collection with timestamptz field
> * [x]  M2 Insert timestamptz field data
> * [x]  M3 Retrieve timestamptz field data
> * [x]  M4 Implement handoff[ ]  

The second PR of issue:
https://github.com/milvus-io/milvus/issues/27467, which completes M1-M4
described above.

---------

Signed-off-by: xtx <xtianx@smail.nju.edu.cn>
2025-08-26 15:59:53 +08:00
groot ccb0db92e7
fix: Not allow to import null element of array field from parquet (#43964)
issue: https://github.com/milvus-io/milvus/issues/43819

Before this fix: null elements are converted to zero or empty strings
After this fix: import job will return error "array element is not
allowed to be null value for field xxx"

Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-08-26 14:45:51 +08:00
Zhen Ye 575345ae7b
fix: get streamingnodes from service discovery without channel assign (#44033)
issue: #43767

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-26 14:29:51 +08:00
Gao e97a618630
enhance: support readAt interface for remote input stream (#43997)
#42032 

Also, fix the cacheoptfield method to work in storagev2.
Also, change the sparse related interface for knowhere version bump
#43974 .
Also, includes https://github.com/milvus-io/milvus/pull/44046 for metric
lost.

---------

Signed-off-by: chasingegg <chao.gao@zilliz.com>
Signed-off-by: marcelo.chen <marcelo.chen@zilliz.com>
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Co-authored-by: marcelo.chen <marcelo.chen@zilliz.com>
Co-authored-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-26 11:19:58 +08:00
zhagnlu 8934c18792
enhance: support cache result cache for expr (#43923)
issue: #43878

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-08-26 10:55:52 +08:00
junjiejiangjjj f1ce84996d
enhance: refactor model service configuration and environment variables (#44036)
- Add enable configuration for all model service providers
- Migrate environment variables from MILVUSAI_* to MILVUS_* prefix with
backward compatibility
- Unify model service enable/disable logic using configuration
- Add tests for environment variable parsing with fallback support

#35856

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-08-26 10:49:52 +08:00
cqy123456 d987dd7103
enhance: Make build ratio of interim index configurable (#43939)
issue: https://github.com/milvus-io/milvus/issues/43993

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-08-25 14:43:51 +08:00
sparknack 4fae074d56
enhance: add write rate limit for disk file writer (#43912)
issue: #43040

---------

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-08-25 10:27:47 +08:00
Zhen Ye d0e3a33c37
enhance: add IsRebalanceSuspended interface for wal balancer (#44026)
issue: #43968

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-24 09:19:47 +08:00
Zhen Ye cbb9392564
fix: filter the streaming node from resource group (#43984)
issue: #43981

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-22 19:21:47 +08:00
junjiejiangjjj f3d7e47227
feat: Supports more rerankers (#43270)
https://github.com/milvus-io/milvus/issues/35856

Signed-off-by: junjiejiangjjj <junjie.jiang@zilliz.com>
2025-08-22 17:29:47 +08:00
congqixia d5ecf49319
enhance: Add request stats interceptor collecting req metrics (#43967)
Related to #43966 #43809

This PR:
- Replace distributed request metrics collection into one interceptor
- Add `Retry` and `Reject` label represents auth rejection and
retry-able error cases

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-22 13:09:47 +08:00
congqixia 606d4c24cd
enhance: Use function def determine field `IsFunctionOutput` only (#43979)
Related to #35853

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-22 04:49:46 +08:00
congqixia 847b79e197
enhance: Use `RLock` for `ListPrivilegeGroups` (#43998)
Related to #43901

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-21 23:45:46 +08:00
Zhen Ye 082ca62ec1
enhance: support balancer interface for streaming client to fetch streaming node information (#43969)
issue: #43968

- Add ListStreamingNode/GetWALDistribution to  fetch streaming node info
- Add SuspendRebalance/ResumeRebalance to enable or stop balance
- Add FreezeNodeIDs/DefreezeNodeIDs to freeze target node

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-21 15:55:47 +08:00
Spade A 8e1ce15146
fix: ngram index is mistakenly used for unsopported operations (#43955)
issue: https://github.com/milvus-io/milvus/issues/43917

1. fix ngrma index to be mistakenly used for unsopported operation
2. fix potential uaf problem

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-08-21 14:41:46 +08:00
Zhen Ye f5cee0012a
fix: remove panic for message type in recovery storage and marshal log (#43976)
issue: #43897

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-21 14:23:47 +08:00
Tianx 26c5c779bf
feat: temporarily disable Timestamptz collection creation (#43935)
issue: https://github.com/milvus-io/milvus/issues/27467

Signed-off-by: xtx <xtianx@smail.nju.edu.cn>
2025-08-21 11:17:46 +08:00
zhagnlu d904c4e677
enhance: optimize compare expr performance for pk field (#43154)
#43153

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-08-21 10:59:46 +08:00
congqixia 7963b17ac1
fix: Revert "fix: Use `folly::SharedMutex` preventing starvation (#43937)" (#43959)
Related to #43958

This reverts commit 580350495a.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-21 10:09:47 +08:00
wei liu 399f63300c
enhance: Implement dynamic interval updates for ticker components (#43865)
issue: #43858

Enable dynamic configuration updates for ticker intervals without
restart. This enhancement allows runtime configuration changes to take
effect immediately for better operational flexibility.

Changes include:
- Apply "drain+Reset only when interval changed" pattern across all
ticker components to preserve existing timing phases
- Fix goroutine variable capture issue in CheckerController.Start()
- Remove unnecessary ticker.Stop() in manual trigger paths
- Add dynamic interval checking in QueryCoordV2 components:
  * checkers/controller.go: Various checker intervals
  * dist/dist_handler.go: DistPullInterval, CheckExecutedFlagInterval
  * session/cluster.go: CheckNodeSessionInterval
  * server.go: CheckAutoBalanceConfigInterval
  * observers/target_observer.go: UpdateNextTargetInterval
  * observers/collection_observer.go: CollectionObserverInterval
- Add dynamic interval checking in QueryNodeV2 components:
  * segments/disk_usage_fetcher.go: DiskSizeFetchInterval
- Ensure thread safety by performing all ticker operations in same
goroutine with proper drain before Reset to avoid spurious triggers

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-21 10:07:47 +08:00
wei liu 384c493d0e
fix: Fix node status inconsistency after QueryCoord restart (#43941)
issue: #43933

Fix the issue where QueryCoord restart leads to node status
inconsistency in resource manager, causing segment loading failures and
incorrect resource group assignments.

Changes include:
- Add CheckNodesInResourceGroup method to sync node status after restart
- Implement proper cleanup of offline/stopping nodes from resource
groups
- Add automatic discovery and assignment of new nodes to resource groups
- Enhance rewatchNodes process to include resource manager
synchronization

This ensures resource manager maintains correct node status and
assignments even after QueryCoord restarts, preventing segment loading
failures and improving system reliability.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-20 14:13:46 +08:00
aoiasd 8d49ffcc8b
enhance: report field name when text match or pharse match failed because field not enable match (#43366)
relate: https://github.com/milvus-io/milvus/issues/41953

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-08-20 10:59:46 +08:00
Spade A d6a428e880
feat: impl StructArray -- support create index for vector array (embedding list) and search on it (#43726)
Ref https://github.com/milvus-io/milvus/issues/42148

This PR supports create index for vector array (now, only for
`DataType.FLOAT_VECTOR`) and search on it.
The index type supported in this PR is `EMB_LIST_HNSW` and the metric
type is `MAX_SIM` only.

The way to use it:
```python
milvus_client = MilvusClient("xxx:19530")
schema = milvus_client.create_schema(enable_dynamic_field=True, auto_id=True)
...
struct_schema = milvus_client.create_struct_array_field_schema("struct_array_field")
...
struct_schema.add_field("struct_float_vec", DataType.ARRAY_OF_VECTOR, element_type=DataType.FLOAT_VECTOR, dim=128, max_capacity=1000)
...
schema.add_struct_array_field(struct_schema)
index_params = milvus_client.prepare_index_params()
index_params.add_index(field_name="struct_float_vec", index_type="EMB_LIST_HNSW", metric_type="MAX_SIM", index_params={"nlist": 128})
...
milvus_client.create_index(COLLECTION_NAME, schema=schema, index_params=index_params)
```

Note: This PR uses `Lims` to convey offsets of the vector array to
knowhere where vectors of multiple vector arrays are concatenated and we
need offsets to specify which vectors belong to which vector array.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
Signed-off-by: SpadeA-Tang <tangchenjie1210@gmail.com>
2025-08-20 10:27:46 +08:00
Alexander Guzhva cfdb17a088
enhance: Fix ArithHelperI64 for SVE in bitset (#43952)
missing ArithHelperI64<ArithOpType::Div, CmpOp>

Signed-off-by: Alexandr Guzhva <alexanderguzhva@gmail.com>
2025-08-19 22:48:58 +08:00
Alexander Guzhva e179a5635f
enhance: remove duplicate code in ArithHelperF32 in SVE for bitset (#43950)
fixes a problem of https://github.com/milvus-io/milvus/pull/43949

Signed-off-by: Alexandr Guzhva <alexanderguzhva@gmail.com>
2025-08-19 22:35:47 +08:00
liliu-z 7dd2b103b0
enhance: Fix template declaration order for ArithHelperF32 in SVE implementation (#43949)
Signed-off-by: Li Liu <li.liu@zilliz.com>
2025-08-19 21:58:22 +08:00
congqixia 580350495a
fix: Use `folly::SharedMutex` preventing starvation (#43937)
Related to #43936

This PR:
- Use `folly::SharedMutex` instead of `std::shared_mutex` preventing
starvation
- Use `folly::SharedMutex::WriteHolder/ReadHolder` instead of
std::shared_lock and std::unique_lock to get better performance

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-19 20:05:46 +08:00
aoiasd dcf04a58b8
feat: support use score function on segment search and use filter (#43868)
relate: https://github.com/milvus-io/milvus/issues/43867
Support boost function score, multiply by the weight if match filter.

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-08-19 16:15:45 +08:00
wei liu d3c95eaa77
enhance: Support partial field updates with upsert API (#42877)
issue: #29735
Implement partial field update functionality for upsert operations,
supporting scalar, vector, and dynamic JSON fields without requiring all
collection fields.

Changes:
- Add queryPreExecute to retrieve existing records before upsert
- Implement UpdateFieldData function for merging data
- Add IDsChecker utility for efficient primary key lookups
- Fix JSON data creation in tests using proper map marshaling
- Add test cases for partial updates of different field types

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-19 11:15:45 +08:00
Gao b602b4187d
enhance: upgrade aws-sdk from 1.9.234 to 1.11.352 (#43916)
issue: #43908

Signed-off-by: chasingegg <chao.gao@zilliz.com>
2025-08-19 11:11:45 +08:00
aoiasd 06006939f8
feat: support use cipher hook in streaming node (#40562)
relate: https://github.com/milvus-io/milvus/issues/40321

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-08-19 10:41:44 +08:00
Zhen Ye a86b6f2a54
enhance: extend the stats manage at streaming shard manager for L0 (#43371)
issue: #42416

- Rename the InsertMetric into ModifiedMetric.
- Add L0 control configuration.
- Add some L0 current state collect.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-18 20:41:46 +08:00
wei liu dada00a81c
fix: dirty querynode doesn't clean up after restart (#43909)
issue: #43905

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-18 18:05:46 +08:00
sthuang fc03fe7623
enhance: avoid frequent LoadWithPrefix etcd calls in ShowCollections … (#43902)
related: https://github.com/milvus-io/milvus/issues/43901

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-08-18 14:57:44 +08:00
congqixia e75fddcc15
fix: Invalidate proxy cache for create alias op (#43854)
Related to #43853

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-18 12:01:45 +08:00
Xianhui Lin b98b3b16a3
feat:add BatchDescribeCollection interface (#43786)
feat:add BatchDescribeCollection interface
issue: https://github.com/milvus-io/milvus/issues/43781

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-08-18 01:23:45 +08:00
Zhen Ye 7b005c48bf
enhance: support util template generation for messages (#43881)
issue: #43880

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-18 01:19:44 +08:00
Xianhui Lin c7d8dc100a
fix: add segment lock in LoadTextIndex and LoadJSONKeyIndex (#43811)
fix: add segment lock in LoadTextIndex and LoadJSONKeyIndex
issue:https://github.com/milvus-io/milvus/issues/43572

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-08-18 01:17:52 +08:00
yihao.dai 64ab3d2681
enhance: Improve error message when query vector and dim mismatch (#43835)
/kind improvement

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-08-18 01:07:44 +08:00
foxspy 647c2bca2d
enhance: Support streaming read and write of vector index files (#43824)
issue: #42032

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-08-15 23:41:43 +08:00
Alexander Guzhva ebb10dfae0
enhance: better auto-detect of SVE options for the bitset library (#43833)
Enables the compilation of SVE code for the bitset library if a C++
compiler supports it.

There are two conditions for enabling the SVE code
* a C++ compiler needs to have a `-march=armv8-a+sve`
* `arm_sve.h` header must be available

AFAIK, `gcc 7 does not support SVE`, `gcc 8` and `gcc 9` support SVE,
but have no `arm_sve.h` file, and only `gcc 10` has both.

Signed-off-by: Alexandr Guzhva <alexanderguzhva@gmail.com>
2025-08-15 22:37:44 +08:00
sthuang 5e4eb4a6e0
enhance: [StorageV2] bump storage version (#43871)
related: https://github.com/milvus-io/milvus/issues/43869

bump storage version. include the following feature:
* https://github.com/milvus-io/milvus-storage/pull/231
* https://github.com/milvus-io/milvus-storage/pull/232
* https://github.com/milvus-io/milvus-storage/pull/233

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-08-15 17:59:43 +08:00
congqixia de3e5c285b
enhance: Add downgrade tsafe switch param item (#43874)
Related to #43873

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-15 12:31:43 +08:00
sthuang c102fa8b0b
enhance: [StorageV2] zero copy for packed writer record batch (#43779)
The Out of Memory (OOM) error occurs because a handler retains the
entire ImportRecordBatch in memory. Consequently, even when child arrays
within the batch are flushed, the memory for the complete batch is not
released. We temporarily fixed by deep copying record batch in #43724.

The proposed fix is to split the RecordBatch into smaller sub-batches by
column group. These sub-batches will be transferred via CGO, then
reassembled before being written to storage using the Storage V2 API.
Thus we can achieve zero-copy and only transferring references in CGO.

related: #43310

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-08-15 10:11:44 +08:00
PjJinchen 64633cc5b3
fix: Metrics with collectionName but no databaseName label are causing name conflicts and confusion (#43277) (#43808)
issue: https://github.com/milvus-io/milvus/issues/43277

---------

Signed-off-by: PjJinchen <6268414+pj1987111@users.noreply.github.com>
2025-08-15 01:37:44 +08:00
Chun Han 412a0eb1c3
fix: httpserver crash for division to zero(#43639) (#43799)
related: #43639

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-08-14 14:59:43 +08:00
wei liu 3e9e830074
enhance: Implement rewatch mechanism for etcd failure scenarios (#43829)
issue: #43828
Implement robust rewatch mechanism to handle etcd connection failures
and node reconnection scenarios in DataCoord and QueryCoord, along with
heartbeat lag monitoring capabilities.

Changes include:
- Implement rewatchDataNodes/rewatchQueryNodes callbacks for etcd
reconnection scenarios
- Add idempotent rewatchNodes method to handle etcd session recovery
gracefully
- Add QueryCoordLastHeartbeatTimeStamp metric for monitoring node
heartbeat lag
- Clean up heartbeat metrics when nodes go down to prevent metric leaks

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-14 10:31:44 +08:00
congqixia e6d7f34f39
enhance: Refine error message for restful default value check (#43842)
Related to #43818

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-13 20:25:43 +08:00
congqixia f032044125
enhance: Refine segcore param change callback (#43838)
Related to #43230

This PR
- Move segcore setup function to `initcore` package to remove cgo
dependency from pkg
- Register core callback only for components depends on segcore
- Rectify `UpdateLogLevel` implementation

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-13 19:31:44 +08:00
zhagnlu b7c7df9440
fix: fix delete consumer bug for cocurrency R-W (#43831)
#41570

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-08-12 11:37:42 +08:00
congqixia 1ced768337
fix: Use `proto.Equal` to compare default value of field (#43813)
Related to #43796

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-11 20:01:42 +08:00
cai.zhang 77f2fb562f
fix: Fix task state is InProgress but payload is nil (#43777)
issue: #43776

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-11 14:13:42 +08:00
Gao 81a0915c29
enhance: add milvus-common module to decouple knwhere & segcore (#43624)
issue: https://github.com/milvus-io/milvus/issues/42032
https://github.com/milvus-io/milvus/issues/41435

based on pr: https://github.com/milvus-io/milvus/pull/42124

---------

Signed-off-by: chasingegg <chao.gao@zilliz.com>
Co-authored-by: xianliang.li <xianliang.li@zilliz.com>
2025-08-11 14:09:42 +08:00
yihao.dai ad950368fe
enhance: Fix parquet import OOM (#43756)
Each ColumnReader consumes ReaderProperties.BufferSize memory
independently. Therefore, the bufferSize should be divided by the number
of columns to ensure total memory usage stays within the intended limit.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-08-08 18:57:40 +08:00
aoiasd eca51ed2c6
enhance: add file resource api (#43766)
relate: https://github.com/milvus-io/milvus/issues/43687

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-08-08 14:17:41 +08:00
zhagnlu 5b83975d39
enhance:convert multi not equal to not in (#43690)
#43689

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-08-08 10:37:40 +08:00
sparknack 169be30a76
enhance: cachinglayer: reserve resource for inevictable cachecell (#43602)
issue: #41435

---------

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-08-08 10:35:49 +08:00
zhagnlu c04d678ad4
enhance: make segcore params effective without restarting milvus (#43231)
#43230

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-08-08 10:33:48 +08:00
congqixia 1561a4ae8c
enhance: [StorageV2] Avoid create local parent dir if fs remote (#43790)
Related to #43752
milvus-storage pr: milvus-io/milvus-storage#230

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-08 10:19:40 +08:00
congqixia b6199acb05
enhance: Utilize `search_batch_pks` for `search_ids` of PkTerm (#43751)
Related to #43660

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-07 14:19:40 +08:00
wei liu 715b5153b8
enhance: Improve delegator serviceable check logic in PinReadableSegments (#43768)
issue: #43767
- Enhance serviceable check logic to properly handle full vs partial
result requirements
- For full result (requiredLoadRatio >= 1.0): check
queryView.Serviceable()
- For partial result (requiredLoadRatio < 1.0): check load ratio
satisfaction
- Add comprehensive unit tests covering all serviceable check scenarios

This enhancement ensures delegator correctly validates serviceability
based on the requested result completeness, improving reliability of
query operations.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-07 12:13:40 +08:00
wei liu 46dfe260da
enhance: Add timestamp filtering support to L0Reader (#43747)
issue: #43745
Add timestamp filtering capability to L0Reader to match the
functionality available in the regular Reader. This enhancement allows
filtering delete records based on timestamp range during L0 import
operations.

Changes include:
- Add tsStart and tsEnd fields to l0Reader struct for timestamp
filtering
- Modify NewL0Reader function signature to accept tsStart and tsEnd
parameters
- Implement timestamp filtering logic in Read method to skip records
outside the specified range
- Update L0ImportTask and L0PreImportTask to parse timestamp parameters
from request options and pass them to NewL0Reader
- Add comprehensive test case TestL0Reader_ReadWithTsFilter to verify ts
filtering functionality using mockey framework

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-06 16:49:39 +08:00
Zhen Ye 8ff118a9ff
fix: call IntoMessageProto instead of Payload when rpc (#43678)
issue: #43677

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-06 14:45:40 +08:00
Zhen Ye 5551d99425
enhance: remove old arch non-streaming arch code (#43651)
issue: #41609

- remove all dml dead code at proxy
- remove dead code at l0_write_buffer
- remove msgstream dependency at proxy
- remove timetick reporter from proxy
- remove replicate stream implementation

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-08-06 14:41:40 +08:00
congqixia d414f6bd4d
enhance: Add assertion preventing reload same field (#43736)
Related to #43725

This patch add assertion preventing segment reloading same field column.
Also improve the message info when pk already exists.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-05 19:35:39 +08:00
cai.zhang d8a3236e44
fix: Reorder worker proto fields to ensure compatibility (#43735)
issue: #43734

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-05 14:59:38 +08:00
sparknack 544c7c0600
enhance: update cachinglayer default cache ratio to 0.3 (#43723)
issue: #41435

---------

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-08-05 01:35:39 +08:00
yihao.dai cb7be8885d
enhance: Deep copy arraw array (#43724)
Deep copy arrow array and make a new RecordBatch with the copied array.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-08-05 00:31:38 +08:00
zhagnlu f14c7d598c
fix: skip load raw data when loading index for storagev2 (#43720)
#43653

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-08-04 21:17:39 +08:00
Chun Han d826d6ac91
fix: try to get span raw data for variable length data type(#43544) (#43705)
related: #43544

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-08-04 11:15:38 +08:00
aoiasd 4f02b06abc
enhance: support set lindera dict build dir and download url in yaml (#43541)
relate: https://github.com/milvus-io/milvus/issues/43120

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-08-04 09:47:38 +08:00
congqixia 4aff581007
enhance: Pass callback in search batch pks to void large result (#43695)
Related to #43660

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-02 17:57:37 +08:00
Buqian Zheng 01baf582d5
fix: GroupChunkTranslator to correctly identify vector field (#43706)
issue: #43653

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-08-02 00:49:37 +08:00
Bingyi Sun b59bc5e2c0
fix: make json path index non exists offsets compatible with 2.5 (#43691)
issue: https://github.com/milvus-io/milvus/issues/43666

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-08-01 23:22:23 +08:00
sparknack bdd65871ea
enhance: tiered storage: estimate segment loading resource usage while considering eviction (#43323)
issue: #41435 

After introducing the caching layer's lazy loading and eviction
mechanisms, most parts of a segment won't be loaded into memory or disk
immediately, even if the segment is marked as LOADED. This means
physical resource usage may be very low. However, we still need to
reserve enough resources for the segments marked as LOADED. Thus, the
logic of resource usage estimation during segment loading, which based
on physcial resource usage only for now, should be changed.

To address this issue, we introduced the concept of logical resource
usage in this patch. This can be thought of as the base reserved
resource for each LOADED segment.

A segment’s logical resource usage is derived from its final evictable
and inevictable resource usage and calculated as follows:

```
SLR = SFPIER + evitable_cache_ratio * SFPER
```

it also equals to

```
SLR = (SFPIER + SFPER) - (1.0 - evitable_cache_ratio) * SFPER
```

`SLR`: The logical resource usage of a segment.
`SFPIER`: The final physical inevictable resource usage of a segment.
`SFPER`: The final physical evictable resource usage of a segment.
`evitable_cache_ratio`: The ratio of a segment's evictable resources
that can be cached locally. The higher the ratio, the more physical
memory is reserved for evictable memory.

When loading a segment, two types of resource usage are taken into
account.

First is the estimated maximum physical resource usage:

```
PPR = HPR + CPR + SMPR - SFPER
```

`PPR`: The predicted physical resource usage after the current segment
is allowed to load.
`HPR`: The physical resource usage obtained from hardware information.  
`CPR`: The total physical resource usage of segments that have been
committed but not yet loaded. When one new segment is allow to load,
`CPR' = CPR + (SMR - SER)`. When one of the committed segments is
loaded, `CPR' = CPR - (SMR - SER)`.
`SMPR`: The maximum physical resource usage of the current segment.
`SFPER`: The final physical evictable resource usage of the current
segment.

Second is the estimated logical resource usage, this check is only valid
when eviction is enabled:

```
PLR = LLR + CLR + SLR
```

`PLR`: The predicted logical resource usage after the current segment is
allowed to load.
`LLR`: The total logical resource usage of all loaded segments. When a
new segment is loaded, `LLR` should be updated to `LLR' = LLR + SLR`.
`CLR`: The total logical resource usage of segments that have been
committed but not yet loaded. When one new segment is allow to load,
`CLR' = CLR + SLR`. When one of the committed segments is loaded, `CLR'
= CLR - SLR`.
`SLR`: The logical resource usage of the current segment.

Only when `PPR < PRL && PLR < PRL` (`PRL`: Physical resource limit of
the querynode), the segment is allowed to be loaded.

---------

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-08-01 21:31:37 +08:00
Buqian Zheng b0226ef47c
fix: added more comprehensive container limit detection (#43693)
issue: #41435

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-08-01 20:37:37 +08:00
wei liu ecc2ac0426
fix: apply load config changes failed after restart (#43554)
issue: #43107

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-08-01 20:13:37 +08:00
Xianhui Lin 0f0edff7f0
fix: increment offset for null data rows in JsonKeyStats (#43679)
fix: increment offset for null data rows in JsonKeyStatsInvertedIndex
issue: https://github.com/milvus-io/milvus/issues/43151

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-08-01 15:53:37 +08:00
Buqian Zheng 21cec95fe8
fix: fix disk path sent to cachinglayer (#43685)
`localDataRootPath` is used to init local chunk manager and has
`querynode` appended to it, thus is incorrect

#41435

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-08-01 13:19:36 +08:00
zhagnlu 2594250906
fix: fix miss loading index for storagev2 (#43674)
#43653

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-08-01 13:07:36 +08:00
congqixia 5f2f4eb3d6
enhance: Ignore entry with same ts when DeleteRecord search pks (#43669)
Related to #43660

This patch reduces the unwanted offset&ts entries having same timestamp
of delete record. Under large amount of upsert, this false hit could
increase large amount of memory usage while applying delete.

The next step could be passing a callback to `search_pk_func_` to handle
hit entry streamingly.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-08-01 10:15:36 +08:00
Ted Xu e37cd19da2
enhance: enable storage v2 by default (#43652)
Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-08-01 08:59:36 +08:00
zhagnlu 239f743a18
fix: add enable_mmap key to load config (#43672)
#43670

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-07-31 21:35:37 +08:00
sparknack 4aabe23a45
enhance: update flat_hash_map.hpp to a modified version (#43506)
issue: #41435

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-07-31 20:09:36 +08:00
Chun Han d72c0357ff
fix: empty hybridsearch result due to one-sub-search empty(#43537) (#43647)
related: #43537

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-07-31 19:47:37 +08:00
congqixia f29964bd17
fix: Add padding for sorted index preventing 0 length mmap (#43663)
Related to #43655

This patch add a padding when writing mmap file for ScalarSortedIndex in
case of mmap falure due to 0 mmap length.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-31 18:53:36 +08:00
zhagnlu 708e426bb3
enhance: using set element for string term type (#43049)
issue: #43048

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-07-31 10:35:37 +08:00
zhagnlu 31801f5937
fix: fix pk in [..] skip next batch when using multi-chunk segment (#43618)
#43494

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-07-31 10:15:37 +08:00
congqixia 089f02bcca
fix: [StorageV2] Align null bitmap offset for fixed-length datatype (#43654)
Related to #43626

Similar to previous pr #43321, null bitmap could be dislocated if the
bitset ptr does not count the offset of array

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-31 09:55:36 +08:00
congqixia 6a74a7de66
enhance: Make DeleteRecord search pks by batch and PinAll (#43640)
Related to #43592

When delete records are large, search pk one by one will result into
many `Pincells` call which creates lots of futures.

This patch make search pk execute in batch to reduce this cost.

Also add `GetAllChunks` API to utilize `PinAllCells` to reduce pins.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-30 19:15:36 +08:00
SimFG 9ffcc55b55
fix: Clean privilege cache after loading policy in InitPolicyInfo (#43642)
- issue: #43641

Signed-off-by: SimFG <bang.fu@zilliz.com>
2025-07-30 16:57:37 +08:00
wei liu 1fae8f5ae3
enhance: Optimize FlushAll performance for multi-table scenarios (#43339)
Replace multiple per-table flush RPC calls with single FlushAll RPC to
improve performance in multi-table scenarios.
issue: #43338
- Implement server-side FlushAll request processing in
DataCoord/MixCoord
- Add flushAllTask to handle unified flush operations across all tables
- Replace proxy-side per-table flush iteration with single RPC call
- Support both streaming and non-streaming service execution paths
- Add comprehensive unit tests for new FlushAll implementation

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-07-30 15:37:37 +08:00
sthuang a2c7ed2780
fix: [StorageV2] sort field binlogs paths for packed reader and writer (#43585)
key changes:
* fix unstable storage v2 compaction unit test by guaranteeing the order
of paths during sync.
* bump milvus-storage version, include
https://github.com/milvus-io/milvus-storage/pull/222
https://github.com/milvus-io/milvus-storage/pull/223
https://github.com/milvus-io/milvus-storage/pull/224
https://github.com/milvus-io/milvus-storage/pull/225
https://github.com/milvus-io/milvus-storage/pull/226
* Also fix the below related oom issue.
related: https://github.com/milvus-io/milvus/issues/43310

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-07-30 08:09:36 +08:00
congqixia 4fe55e3008
fix: [StorageV2] Use separate channel for `get_cells` (#43632)
Related to #43584

There might be concurrent calls on `translator.get_cells`. The channel
cannot be shared among these calls, otherwise the logic will break.

This patch create new channel for each `get_cells` invocation in case of
data race.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-29 20:59:38 +08:00
Zhen Ye 3e3775fb81
fix: panics when describe collection internal failure (#43630)
issue: #43629

- also fix the scanner_switchable panic underlying wal scanner return
context error.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-29 20:33:36 +08:00
Zhen Ye cd38d65417
fix: make savebinlogpath idompotent at binlog level (#43615)
issue: #43574

- update all binlog every time when calling udpate savebinlogpath.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-29 19:47:36 +08:00
foxspy d57890449f
enhance: update knowhere version (#43528)
issue: #42937

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-07-29 17:21:36 +08:00
XuanYang-cn 0ccb95303e
feat: [CMEK] Add utils to load plugins (#42986)
See also: #40321

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-07-29 17:17:36 +08:00
Buqian Zheng 052fb6c562
feat: add time based eviction to data managed by cachinglayer (#43490)
issue: https://github.com/milvus-io/milvus/issues/41435

also added disk capacity protection

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-07-29 16:17:35 +08:00
Bingyi Sun a765cd1eaa
enhance: unlink mmap file when chunk and index are destructed (#43524)
issue: https://github.com/milvus-io/milvus/issues/41636

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-07-29 16:05:36 +08:00
congqixia 268f1cdace
fix: Hold field shared_ptr in case of being released (#43614)
Related to #43584

Directly accessing `fields_` in `get_raw_data` may have race if load vec
index happens concurrently during getting raw data.

This PR make `bulk_subscript` hold shared_ptr of field column prevent
field column being release during reading it.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-29 12:15:36 +08:00
Chun Han 4ee9f63f72
fix: return id by default(#43595) (#43601)
related: #43595

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-07-29 12:07:36 +08:00
aoiasd c9412434c8
enhance: add char group tokenizer (#42793)
relate: https://github.com/milvus-io/milvus/issues/42792
Add char group tokenizer which support use costum char group or use some
build-in char group as delimiters.

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-07-29 11:11:35 +08:00
congqixia f666d89919
fix: [StorageV2] Access future result to get exception if any (#43613)
Related to #43584

When `LoadWithStrategy` throw exception, the ex was wrapped in the
returned future. If the future is not handled, this exception would be
ignored.

This patch add `future.get()` to get exception if any.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-28 22:33:35 +08:00
Xiaofan bd31b32167
fix: hybridsearch should support offset param in restful api (#43586)
Add support of offset param for reqeustful. api and refine some constant
usage related #43556

Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
2025-07-28 22:15:36 +08:00
yihao.dai a29b3272b0
fix: Improve import memory management to prevent OOM (#43568)
1. Use blocking memory allocation to wait until memory becomes available
2. Perform memory allocation at the file level instead of per task
3. Limit Parquet file reader batch size to prevent excessive memory
consumption
4. Limit import buffer size from 20% to 10% of total memory

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-07-28 21:25:35 +08:00
Zhen Ye 5b9b895cb0
fix: get schema panics when recover from channel checkpoint (#43605)
issue: #43597, #43598

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-28 16:42:56 +08:00
Spade A 864d1b93b1
enhance: enable stlsort with mmap support (#43359)
issue: https://github.com/milvus-io/milvus/issues/43358

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-07-28 15:32:55 +08:00
zhagnlu 9bf1cb02d5
fix: add array_contains_all int to float converter (#43593)
#43334

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-07-28 14:14:55 +08:00
yihao.dai 192521c6bd
enhance: Fix unbalanced task scheduling (#43581)
Make scheduler always pick the node with the most available slots.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-07-28 12:58:55 +08:00
congqixia 34d3f0c0f8
enhance: Reserve builder space for ValueSerializer (#43570)
Add `arrowBuild.Reserve` call for `ValueSerializer` to reduce repeated
resizing buffer when write size is large

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-28 11:02:55 +08:00
wei liu 7b8bf6393b
enhance: Improve partial result evaluation with row count based strategy (#43361)
issue: #43360
Enhance the partial result evaluation mechanism in delegator to use row
count based data ratio instead of simple segment count ratio for better
accuracy.

Key improvements:
- Introduce PartialResultEvaluator interface for flexible evaluation
strategy
- Implement NewRowCountBasedEvaluator using sealed segment row count
data
- Replace segment count based ratio with row count based data ratio
calculation
- Update PinReadableSegments to return sealedRowCount information
- Modify executeSubTasks to use configurable evaluator for partial
result decisions
- Add comprehensive unit tests for the new row count based evaluation
logic

This change provides more accurate partial result evaluation by
considering the actual data volume rather than just segment quantity,
leading to better query performance and consistency when some segments
are unavailable.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-07-28 10:18:55 +08:00
Zhen Ye 7877aaa96c
fix: dirty cp metrics after drop (#43567)
issue: #42688

- The channel cp is dropped by garbage collector
- The channel is dropped and the cp is marked as math.Uint64
- If we drop it here, the update channel checkpoints will write the
dirty cp back.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-27 23:22:55 +08:00
Zhen Ye feb5db60f2
fix: make flush save binlog paths idempotent (#43579)
issue: #43574

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-27 23:14:55 +08:00
Spade A faeb7fd410
feat: impl StructArray -- create schema, insert, and retrieve data (#42855)
Ref https://github.com/milvus-io/milvus/issues/42148

https://github.com/milvus-io/milvus/pull/42406 impls the segcore part of
storage for handling with VectorArray.
This PR:
1. impls the go part of storage for VectorArray
2. impls the collection creation with StructArrayField and VectorArray
3. insert and retrieve data from the collection.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
Signed-off-by: SpadeA-Tang <tangchenjie1210@gmail.com>
Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
2025-07-27 01:30:55 +08:00
Buqian Zheng b497d3d7a4
fix: call promise->setValue only after released the ListNode mtx (#43547)
issue: #43261

`promise->setValue(folly::Unit());` may run callbacks inline and some of
them may attempt to grab `mtx_`. So we should not call
`promise->setValue(folly::Unit());` while holding the lock.

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-07-26 18:34:55 +08:00
Ted Xu 9041bf1b9a
fix: including shouldCopy parameter in file readers (#43578)
This parameter determines whether the returned value should be a copy or
a reference from the arrow array. The updates enhance memory management
and provide more control over data handling during deserialization.

See #43186

---------

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-07-26 17:30:55 +08:00
Bingyi Sun 742d72a6c2
fix: Fix wrong null offsets for json path index (#43390)
issue: https://github.com/milvus-io/milvus/issues/43315

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-07-26 17:26:54 +08:00
Bingyi Sun a89e579485
fix: use tantivy version to make json index compatible with milvus 2.5 (#43563)
issue: https://github.com/milvus-io/milvus/issues/43562

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-07-26 17:18:55 +08:00
congqixia 0b860b4aec
fix: Revert "enhance: DataCodec to release ownership of input_data after initialization (#43542)" (#43571) 2025-07-25 20:48:16 +08:00
Zhen Ye 070aabd27e
enhance: fix remove flushing state of segment (#43560)
issue: #43559, #42884

- also fix the data lost when streaming resuming from old arch message.

Signed-off-by: chyezh <chyezh@outlook.com>
2025-07-25 18:08:54 +08:00
congqixia 2a7b7a811a
fix: [StorageV2] Throw exception when read rg fails (#43561)
Related to #43261

Read error with catched in `LoadWithStrategy`. Caller could not detect
read failure when some error occurred. This patch make
`LoadWithStrategy` throw ex instead of swallowing it.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-07-25 17:40:55 +08:00
yihao.dai 0e1f367164
enhance: Fail compaction task to prevent data loss (#43545)
We’ve frequently observed data loss caused by broken mutual exclusion in
compaction tasks. This PR introduces a post-check: before modifying
metadata upon compaction task completion, it verifies the state of the
input segments. If any input segment has been dropped, the compaction
task will be marked as failed.

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-07-25 16:24:54 +08:00
Ted Xu 078ccf5e08
fix: the underlying record got released in clustering compaction (#43551)
See: #43186

In this PR:

1. Flush renamed to FlushChunk, while a new Flush primitive is
introduced to serialize values to records.
2. Segment mapping in clustering compaction now process data by records
instead of values, it calls flush to all buffers after each record is
processed.

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-07-25 15:04:54 +08:00