22313 Commits

Author SHA1 Message Date
github-actions[bot]
4897fd7bb8 Update Builder image changes 2025-11-07 04:09:24 +00:00
congqixia
6dd7b7c197
enhance: [2.5] Bump go version to 1.24.9 (#45370)
Cherry-pick from master
pr: #45359 
Fixing CVE-2025-58187

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-11-07 10:19:35 +08:00
XuanYang-cn
2d6c736448
fix: [2.5]Accidentally ignored sealed segments in L0 Compaction #45341 (#45342)
When there're no growing segments in the collection, L0 Compaction will
try to choose all L0 segments that hits all L1/L2 segments.

However, if there's Sealed Segment still under flushing in DataNode at
the same time L0 Compaction selects satisfied L1/L2 segments, L0
Compaction will ignore this Segment because it's not in "FlushState",
which is wrong, causing missing deletes on the Sealed Segment.

This quick solution here is to fail this L0 compaction task once
selected a Sealed segment.

See also: #45339
pr: #45340
pr: #45341

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-11-06 19:21:35 +08:00
XuanYang-cn
93e8c5465a
test: Increase PyMilvus version to 2.5.17rc3 for 2.5 branch (#45213)
Automated daily bump from pymilvus 2.5 branch. Updates
tests/python_client/requirements.txt.

---------

Signed-off-by: XuanYang-cn <xuan.yang@zilliz.com>
Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-11-06 17:01:35 +08:00
sparknack
91645d9242
enhance: [2.5] unify the aligned buffer for both buffered and direct I/O (#45324)
issue: #43040
pr: #45323

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-11-06 10:55:35 +08:00
yihao.dai
96a35baa46
fix: [2.5] support upgrading from 2.5.x -> 2.6.5 (#45313)
issue: https://github.com/milvus-io/milvus/issues/43897

pr: https://github.com/milvus-io/milvus/pull/45264

---------

Signed-off-by: chyezh <chyezh@outlook.com>
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Co-authored-by: chyezh <chyezh@outlook.com>
2025-11-05 21:31:34 +08:00
congqixia
ec5189f9c4
enhance: Bump milvus & proto version to v2.5.21 (#45297)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pkg/v2.5.21
2025-11-05 10:55:33 +08:00
sparknack
561b167f1e
fix:[2.5] avoid potential race conditions when updating the executor (#45231)
issue: #43030
pr: #45230

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-11-05 10:15:33 +08:00
cai.zhang
2e4502a4fc
fix: [2.5]Skip create tmp dir for growing R-Tree index (#45258)
issue: https://github.com/milvus-io/milvus/issues/45181

master pr: https://github.com/milvus-io/milvus/pull/45256

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-04 17:35:34 +08:00
zhuwenxing
36a30dd34e
test: add geometry datatype testcases (#44383)
master pr: https://github.com/milvus-io/milvus/pull/44646

/kind improvement

---------

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-11-04 11:03:34 +08:00
cai.zhang
cc9735ff4f
enhance: [2.5]Make GeometryCache an optional configuration (#45197)
issue: #45187 
master pr: #45192

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-03 20:31:34 +08:00
cai.zhang
dfcef7d14d
fix: [2.5]Fix sort stats task failed when segment is compacting (#45185)
issue: #45184

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-03 11:25:33 +08:00
cai.zhang
0ca74f234f
fix: [2.5] Fix import null geometry data (#45163)
issue: #44787 

master pr: #45161

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-31 12:34:10 +08:00
sre-ci-robot
8f2ca3bf0f
[automated] Bump milvus version to v2.5.20 (#45179)
Bump milvus version to v2.5.20
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-31 10:12:09 +08:00
congqixia
93fb9a4b18
enhance: Bump milvus & proto version to v2.5.20 (#45140)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
v2.5.20 pkg/v2.5.20
2025-10-30 10:46:09 +08:00
foxspy
0f0ea4d206
enhance: [2.5] update knowhere version (#45148)
issue: #42937 
/kind branch-feature

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-10-30 10:08:08 +08:00
cai.zhang
e58cd7fcc4
fix: [2.5]Fix bug for importing Geometry data (#45091)
issue: https://github.com/milvus-io/milvus/issues/44787 ,
https://github.com/milvus-io/milvus/issues/45012
master pr: https://github.com/milvus-io/milvus/pull/45089

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-29 18:48:13 +08:00
cai.zhang
3ebd1f2f26
fix: [2.5]Fix retrieve geometry null data when enable mmap (#45142)
issue: #44648

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-29 16:48:12 +08:00
aoiasd
529a31a1bf
enhance: [2.5]support use nullable field as bm25 function input field (#44586) (#45118)
relate: https://github.com/milvus-io/milvus/pull/44586

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-10-28 19:20:11 +08:00
zhagnlu
78d70db6fd
fix: support skip load json stats when disable jsonstats (#45098)
pr: #45101

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-10-28 10:50:11 +08:00
congqixia
9ed77d4484
fix: [2.5] prevent data race in querycoord collection notifier update (#45037) (#45052)
Cherry-pick from master
pr: #45037
Fixes #45035

This commit addresses a data race issue where refreshCollection was
updating the collection notifier without proper lock protection.

Changes:
- Add UpdateCollection method to CollectionManager with proper locking
- Introduce CollectionOperator pattern for thread-safe collection
updates
- Make setRefreshNotifier private and use it through the operator
pattern
- Update refreshCollection to use the new UpdateCollection method
- Handle collection not found error gracefully in refreshCollection

The CollectionOperator pattern ensures all collection modifications go
through the CollectionManager's lock, preventing concurrent access
issues.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-23 19:34:12 +08:00
wei liu
c633556fee
fix: [2.5] Handle empty FieldsData in reduce/rerank for requery scenario (#44919)
issue: #44909
pr: #44917
When requery optimization is enabled, search results contain IDs but
empty FieldsData. During reduce/rerank operations, if the first shard
has empty FieldsData while others have data, PrepareResultFieldData
initializes an empty array, causing AppendFieldData to panic when
accessing array indices.

Changes:
- Find first non-empty FieldsData as template in 5 functions:
  reduceAdvanceGroupBY, reduceSearchResultDataWithGroupBy,
  reduceSearchResultDataNoGroupBy, rankSearchResultDataByGroup,
  rankSearchResultDataByPk
- Add length check before 4 AppendFieldData calls to prevent panic
- Add unit tests for empty and partial empty FieldsData scenarios

This fix handles both pure requery (all empty) and mixed scenarios
(some empty, some with data) without breaking normal search flow.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-10-21 19:48:04 +08:00
cai.zhang
d43b030b4d
fix: [2.5] Fix bug for gis function to filter geometry (#44968)
issue: #44961
master pr: #44966 

This PR fixes 3 geometry related bugs:
1. Implement ToString interface for GisFunctionFilter.
2. Ignore GisFunctionFilter MoveCursor for growing segment.
3. Don't skip null geometry for building R-Tree index, should be record
in null_offsets.

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-21 17:00:13 +08:00
Bingyi Sun
a0201ef98d
enhance: optimize the performace of bitmap reverse lookup (#44804) (#44958)
pr: https://github.com/milvus-io/milvus/pull/44804

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-10-21 14:38:04 +08:00
sre-ci-robot
2370dba91a
[automated] Bump milvus version to v2.5.19 (#44766)
Bump milvus version to v2.5.19
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-20 18:00:04 +08:00
cai.zhang
c6cc3d2c25
fix: [2.5] Fix the geometry return POINT(0 0) when growing mmap is enabled (#44891)
issue: #44802 
master pr: #44889 

After a Geometry object is serialized into WKB, the resulting binary may
contain '\0' bytes.
When growing mmap is enabled, the append data logic uses strcpy, which
stops copying at the first '\0' bytes.
This causes only part of the WKB---typically the portion up to the
geometry type field to be copied, leading to corrupted data.
As a result, during parsing, all POINT geometries are incorrectly
interperted as POINT(0 0).

To fix this issue, memcpy will be used instead of strcpy.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-17 17:16:08 +08:00
cai.zhang
f27dfa4490
enhance: [2.5]Support import geometry data by json/csv (#44828)
issue: #44787 
master pr: #44826 
2.6 pr: #44827

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-17 17:14:23 +08:00
cqy123456
e4b72977dd
fix:[2.5]remove the limit of deduplicate case when disable autoindex (#44782)
issue: https://github.com/milvus-io/milvus/issues/44702
related pr: https://github.com/milvus-io/milvus/pull/44825

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-10-17 11:40:02 +08:00
congqixia
93411a388c
fix: [2.5] ensure deterministic search result ordering when scores are equal (#44870) (#44885)
Cherry-pick from master
pr: #44870

Related to #44819
This fix addresses an issue(#44819) where the offset parameter did not
work correctly during searches when multiple results had identical
scores. The problem occurred because results with equal scores were not
consistently ordered, leading to unpredictable pagination behavior.

The solution adds a new sorting step (SortEqualScoresByPks) in the
reduce phase that sorts results with identical scores by their primary
keys in ascending order. This ensures deterministic ordering and enables
proper offset functionality.

Changes:
- Add SortEqualScoresByPks() to sort results with equal scores by PK
- Add SortEqualScoresOneNQ() to handle per-query sorting logic
- Invoke sorting step after FillPrimaryKey() in Reduce() workflow

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-16 19:34:08 +08:00
wei liu
82081eba1b
fix: [2.5] Fix deactivate balance checker also stops stopping balance (#44835)
issue: #43858
pr: #44834
Fix the issue introduced in PR #43992 where deactivating the balance
checker incorrectly stops stopping balance operations.

Changes:
- Move IsActive() check after stopping balance logic
- Only skip normal balance when checker is inactive
- Allow stopping balance to proceed regardless of checker state

This ensures stopping balance can execute even when the balance checker
is deactivated.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-10-15 15:56:01 +08:00
aoiasd
71fc23dd24
fix: [2.5] dropped segment in excluded segment use wrong excluded ts (#44771)
relate: https://github.com/milvus-io/milvus/issues/43114
pr: https://github.com/milvus-io/milvus/pull/43115
https://github.com/milvus-io/milvus/pull/44769

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-10-15 15:06:01 +08:00
wei liu
47949fd883
enhance: Implement rewatch mechanism for etcd failure scenarios (#43829) (#43920)
issue: #43828
pr: #43829 #43909
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>
Co-authored-by: Zhen Ye <chyezh@outlook.com>
2025-10-15 14:12:01 +08:00
congqixia
1f94b1f5f6
fix: [2.5] avoid concurrent Reset/Add operations on DataCoord metrics (#44789) (#44817)
Cherry-pick from master
pr: #44789

This commit addresses issue #44788 where the
`datacoord_stored_binlog_size` metric could become inaccurate when
multiple concurrent `GetMetrics` calls arrived at DataCoord.

### Problem

The original implementation called `Reset()` followed by `Add()`
operations on Prometheus metrics within the `GetQuotaInfo()` method.
When multiple goroutines invoked this method concurrently, race
conditions occurred:
- Thread 1: Reset() → Add(value1)
- Thread 2: Reset() → Add(value2)
- Result: Metrics could be reset multiple times and values added in an
interleaved fashion, leading to inaccurate and inflated metric values

### Solution

Changed the approach from `Reset() + Add()` to aggregating metric values
in local maps first, then using `Set()` to update metrics atomically:

1. Collect segment size data into local maps:
   - `storedBinlogSize`: tracks size per collection per segment state
   - `binlogFileSize`: tracks total file count per collection
   - `coll2DbName`: maps collection IDs to database names

2. After aggregation is complete, use `Set()` (instead of `Add()`) to
update metrics in a single operation per label combination

This ensures that concurrent `GetMetrics` calls don't interfere with
each other, as each invocation works with its own local state and only
updates the final metric value atomically.

---------

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-14 20:06:00 +08:00
nico
3516f9f368
enhance: [skip e2e] modify nightly time for 2.5 branch (#44833)
Signed-off-by: nico <cheng.yuan@zilliz.com>
2025-10-14 16:58:08 +08:00
jiaqizho
00ef6032c6
enhance:[2.5] Introduce sparse filter in query (#44347) (#44790)
pr: #44347

Signed-off-by: jiaqizho <jiaqi.zhou@zilliz.com>
2025-10-14 15:02:01 +08:00
congqixia
c30cb6c283
enhance: [2.5] Add accesslog field for template value length info (#44723) (#44791)
Cherry-pick from master
pr: #44723 
Related to #36672

Add accesslog field displaying value length for search/query request may
help developers debug related issues

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-13 14:29:58 +08:00
congqixia
17a91f3bdf
enhance: Bump milvus & proto version to v2.5.19 (#44693)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pkg/v2.5.19 v2.5.19
2025-10-11 11:37:58 +08:00
wei liu
cbe2761e99
fix: Fix L0 segment duplicate load task generation during channel balance (#44700)
issue: #44699
Fix the issue where L0 segment checking logic incorrectly identifies L0
segments as missing when they exist on multiple delegators during
channel balance process, which blocks sealed segment loading and target
progression.

Changes include:
- Replace GetLatestShardLeaderByFilter with GetByFilter to check all
delegators instead of only the latest leader
- Iterate through all delegator views to identify which ones lack the L0
segment

The original logic only checked the latest shard leader, causing false
positive detection of missing L0 segments when they actually exist on
other delegators in the same channel during balance operations. This led
to continuous generation of duplicate L0 segment load tasks, preventing
normal sealed segment loading flow.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-10-11 10:04:00 +08:00
congqixia
03223ddb8b
enhance: [2.5] Update builder image for bumping go version (#44728)
Related to #44718

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-11 09:41:59 +08:00
congqixia
5edbc913d3
enhance: [2.5] use fixed vcpkg version for build image (#44378) (#44740)
Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
Co-authored-by: aoiasd <45024769+aoiasd@users.noreply.github.com>
2025-10-10 19:35:57 +08:00
cai.zhang
52ab33ba88
fix: [2.5] Skip empty loop for process growing segment (#44608)
issue: #43427 
master pr: #44606 

The GISFunction asserts that the segment_offsets cannot be nullptr. When
size is 0, the segment_offsets is nullptr, so the loop is skiped.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-10 14:55:59 +08:00
congqixia
7f52c02871
enhance: [2.5] Bump go verion to 1.24.6 (#44718)
Bump go verion to v1.24.6 fixing CVE-2025-47907

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-10 14:45:57 +08:00
congqixia
cb0e88632f
enhance: [2.5] Make accesslog.$consistency_level represent actual value used (#44708)
Cherry-pick from master
pr: #44706 
Related to #44703

This PR:
- Add `SetActualConsistencyLevel` to `info.AccessInfo` interface and
  related util method processing it
- Make `$consistency_level` returning actual value if set

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-09 21:55:59 +08:00
Bingyi Sun
9434a3bdaa
fix: Fix bulk import with autoid (#44601)
pr: #44604 
issue: #44424

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-10-09 14:51:58 +08:00
congqixia
c86d68bea5
enhance: [2.5] Bump arrow/go to v17 (#44663)
Related to #40777

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-09 11:47:57 +08:00
Bingyi Sun
7a02569602
enhance: [go-sdk]allow users to insert pk data if autoid is enabled (#44562)
pr: https://github.com/milvus-io/milvus/pull/44561
issue: #44424

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-09-29 11:27:06 +08:00
wei liu
892d63d26e
enhance: [2.5] Refactor balance checker with priority queue (#43992) (#44588)
issue: #43858
pr: #43992
Refactor the balance checker implementation to use priority queues for
managing collection balance operations, improving processing efficiency
and order control.

Changes include:
- Export priority queue interfaces (Item, BaseItem, PriorityQueue)
- Replace collection round-robin with priority-based queue system
- Add BalanceCheckCollectionMaxCount configuration parameter
- Optimize balance task generation with batch processing limits
- Refactor processBalanceQueue method for different strategies
- Enhance test coverage with comprehensive unit tests

The new priority queue system processes collections based on row count
or collection ID order, providing better control over balance operation
priorities and resource utilization.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-09-28 19:23:05 +08:00
wei liu
3a7a08f2b3
enhance: [2.5] Add granular flush targets support for FlushAll operation (#44431)
issue: #44156
pr: #44234
Enhance FlushAll functionality to support targeting specific collections
within databases instead of only database-level flushing.

Changes include:

- Add FlushAllTarget message in data_coord.proto for granular targeting
- Support collection-specific flush operations within databases
- Maintain backward compatibility with deprecated db_name field

This enhancement allows users to flush specific collections without
affecting other collections in the same database, providing more precise
control over data persistence operations.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-09-28 10:37:06 +08:00
Bingyi Sun
2e0c0c08bb
feat: allow users to write pk field when autoid is enabled (#44520)
issue: https://github.com/milvus-io/milvus/issues/44011
pr: https://github.com/milvus-io/milvus/pull/44424

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
2025-09-24 20:26:06 +08:00
cai.zhang
3dc43422be
enhance: Use GEOSGeometry directly to skipping the gdal to geos conversion (#44519)
issue: #43427

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-09-24 18:30:06 +08:00