22353 Commits

Author SHA1 Message Date
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
5318f3085c
feat: Add configuration for mixCoord (#41246)
Add configuration for mixCoord
relate-pr:https://github.com/milvus-io/milvus/pull/41006
issue : https://github.com/milvus-io/milvus/issues/37764

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2025-04-11 18:04:49 +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
congqixia
4d37b2870d
enhance: [GoSDK] Add more example for godoc (#41234)
Related to #31293

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-11 13:26: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
congqixia
8c679161f8
fix: [GoSDK] Fix array row base convertion logic (#41197)
Related to #40928

Array column is nil due to var lifespan issue

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-10 22:26: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
zhuwenxing
8b9bb5dd68
test: add JsonQueryChecker in test (#41096)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-04-10 10:28:29 +08:00
sre-ci-robot
c15c55055c Update all contributors
Signed-off-by: sre-ci-robot <sre-ci-robot@zilliz.com>
2025-04-09 12:01:04 +00: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
yanliang567
bbaa3c71f4
test: [E2e Refactor]gen collection name by testcase name and update search pagination test (#41170)
1.  gen collection name by testcase name
2. update search pagination test with milvus client v2
3. use collection shared mode for some tests
related issue: #40698

---------

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
2025-04-09 17:44:28 +08:00
binbin
13f31af35a
test: Add more json value expression tests (#41137)
Signed-off-by: binbin lv <binbin.lv@zilliz.com>
2025-04-09 17:18:26 +08:00
zhuwenxing
bec729ae11
test: update run analyzer test (#41064)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-04-09 17:16:35 +08:00
zhagnlu
3ed23a5f48
fix: fix remove index type failed when remote storage is local mode (#41164)
#41142

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-04-09 16:42:26 +08:00
zhagnlu
ee1faf80dd
fix:add clear bitmap for batch skip mode (#41166)
#41086 #41150

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-04-09 13:08:27 +08:00
zhenshan.cao
ecc2d80915
enhance: Add primary field name in SearchResult and QueryResults (#39220)
issue: https://github.com/milvus-io/milvus/issues/39219

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
2025-04-09 10:48:25 +08:00
congqixia
d6f4348965
fix: [GoSDK] Fill collection schema for query resultset (#41161)
Related to #41108

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-09 10:34:26 +08:00
sthuang
50e02e3598
enhance: update packed reader api (#41055)
related: https://github.com/milvus-io/milvus/issues/39173

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-04-09 10:18:26 +08:00
congqixia
e2d8adb963
fix: Use element_type for Array is null operator (#41157)
Related to #41156

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-09 10:16:24 +08:00
cai.zhang
8a77fb9cdc
enhance: Support slot for index task and stats task (#39084)
issue: #39101

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-04-08 20:46:25 +08:00
Spade A
c6a0c2ab64
enhance: process tantivy document add by batch (#40124)
issue: https://github.com/milvus-io/milvus/issues/40006

This PR make tantivy document add by batch. Add document by batch can
greately reduce the latency of scheduling the document add operation
(call tantivy `add_document` only schdules the add operation and it
returns immediately after scheduled) , because each call involes a tokio
block_on which is relatively heavy.

Reduce scheduling part not necessarily reduces the overall latency if
the index writer threads does not process indexing quickly enough.
But if scheduling itself is pretty slow, even the index writer threads
process indexing very fast (by increasing thread number), the overall
performance can still be limited.

The following codes bench the PR (Note, the duration only counts for
scheduling without commit)
```
fn test_performance() {
    let field_name = "text";
    let dir = TempDir::new().unwrap();
    let mut index_wrapper = IndexWriterWrapper::create_text_writer(
        field_name,
        dir.path().to_str().unwrap(),
        "default",
        "",
        1,
        50_000_000,
        false,
        TantivyIndexVersion::V7,
    )
    .unwrap();

    let mut batch = vec![];
    for i in 0..1_000_000 {
        batch.push(format!("hello{:04}", i));
    }
    let batch_ref = batch.iter().map(|s| s.as_str()).collect::<Vec<_>>();

    let now = std::time::Instant::now();
    index_wrapper
        .add_data_by_batch(&batch_ref, Some(0))
        .unwrap();
    let elapsed = now.elapsed();
    println!("add_data_by_batch elapsed: {:?}", elapsed);
}
```
Latency roughly reduces from 1.4s to 558ms.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-08 19:50:24 +08:00
Bingyi Sun
da21640ac3
fix: Fix the bug that null data can not be filtered by null expr (#41124)
issue: https://github.com/milvus-io/milvus/issues/41063

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-04-08 19:12:24 +08:00
cai.zhang
a7713df18d
fix: Correctly parse the minimum value of int64 (#41009)
issue: #40729 

Current approach to parse negative numbers is first parse the numeric
part and then multiply the result by -1(mainly to distinguish the
precedence of the negative sign and the subtraction operator). However,
for the minimum value of int64(`-9223372036854775808`), the value
`9223372036854775808` already exceeds the representable range of int64.
As a result, parsing error occurs.
Therefore, use a specific rule to match `-9223372036854775808`.

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-04-08 16:36:26 +08:00
zhenshan.cao
758cf29e77
fix: create multiple idential indexes by accident (#40179)
issue: https://github.com/milvus-io/milvus/issues/40163

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
2025-04-08 15:06:25 +08:00
aoiasd
6f17720e4e
enhance: support use jieba tokenizer with costum dictionary (#39854)
relate: https://github.com/milvus-io/milvus/issues/40168

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-08 14:52:27 +08:00
congqixia
96eca2531f
fix: Avoid update original search/query request (#41126)
Related to #41034

Recent pr #40842 introduced logic to avoid requery pk column, which
updates the original request which makes the request not equavilant to
the original one.

When retry happens due to incomplete request error, this change makes
the final result set lacks the pk column even when user specifies it
explicitly.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-08 14:26:28 +08:00
wei liu
57212e5376
enhance: Optimize log output for L0 segment deletions (#40975)
related to: #40884 #39552
Reduce log frequency by aggregating deletion logs for L0 segments:
- Add segment count statistics in rangeHitL0Deletions function
- Change individual segment logs to a single consolidated log entry
- Include total number of processed L0 segments in log output

This change significantly reduces log volume while maintaining essential
visibility into deletion operations.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-04-08 12:04:26 +08:00
wei liu
f79391dea9
fix: remove metrics reset calls to ensure accurate reporting (#41049)
issue: #41048
Fixes issue introduced in PR #33522 where metric resets caused
incomplete data collection by monitoring systems.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-04-08 11:38:36 +08:00
congqixia
1afa7433f0
enhance: Rectify client_request_id logic (#41089)
The traceID is not initialized by client_request_id in context. If the
client sent valid traceID, milvus log will print two different traceID
which is wierd.

This PR add the logic to tray parsing incoming `client_request_id` into
traceID. If it works just use it the request traceID, otherwise set it
to a different field named `client_request_id`.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-08 10:32:26 +08:00
Ted Xu
1bcea2a775
fix: assigning the correct storage version in sync and index tasks (#41093)
See #39663 #40667

---------

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2025-04-08 10:14:25 +08:00
Zhen Ye
7830dd3713
fix: keep the last persisted message in writeaheadbuffer to fix the never catch up (#41109)
issue: #41062

Signed-off-by: chyezh <chyezh@outlook.com>
2025-04-08 09:10:28 +08:00
Spade A
e4da2765ba
enhance: process batch of strings within one tantivy_index_add_string call (#40007)
issue: #40006

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-04-08 01:20:25 +08:00
congqixia
484cd8c4a9
fix: Ignore growing segment without start pos for seal policy (#41130)
Related to #41129

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-07 22:16:23 +08:00
Bingyi Sun
355f62d6c9
fix: Align brute force search with json index for exists expr (#41116)
issue: #35528

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-04-07 15:42:23 +08:00
wei liu
99270103cf
fix: Offline segment block delegator recovery (#40827)
issue: #39937
Before PR #39552, whenever a segment was missing in either the `current
target` or the `next target`, we would trigger `load segment` to recover
the delegator. However, restoring only the missing segments in the `next
target` is sufficient to advance the target and complete the recovery
process.

In PR #39552, we removed the scheduling of L0 segments along with this
unnecessary `load segment` logic. However, this exposed a new issue: if
the `current target` still has missing segments and there is a flaw in
the `checkDelegatorDataReady` logic, it could block the recovery of a
delegator that contains `offline segments`.

Since `offline segments` are cleaned up asynchronously in this scenario,
this PR removes their blocking effect on delegator recovery, ensuring a
smoother failure recovery process.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-04-07 14:56:22 +08:00
zhagnlu
ee8783cae9
fix:add operator type for some operator (#40895)
#40894

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-04-07 11:58:27 +08:00