23713 Commits

Author SHA1 Message Date
sparknack
0a2f8d4f63
enhance: map multi row groups into one cache cell (#46249)
issue: #45486

Introduce row group batching to reduce cache cell granularity and
improve
memory&disk efficiency. Previously, each parquet row group mapped 1:1 to
a cache
cell. Now, up to `kRowGroupsPerCell` (4) row groups are merged into one
cell.
This reduces the number of cache cells (and associated overhead) by ~4x
while
maintaining the same data granularity for loading.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Switched to cell-based grouping that merges multiple row groups for
more efficient multi-file aggregation and reads.
* Chunk loading now combines multiple source batches/tables per cell and
better supports mmap-backed storage.

* **New Features**
* Exposed helpers to query row-group ranges and global row-group offsets
for diagnostics and testing.
* Translators now accept chunk-type and mmap/load hints to control
on-disk vs in-memory behavior.

* **Bug Fixes**
* Improved bounds checks and clearer error messages for out-of-range
cell requests.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-12-23 14:57:18 +08:00
congqixia
d3b15ac136
enhance: support pk isolation optional field data loading from manifest for index build (#46480)
### **User description**
Related to #44956

Add manifest-based data loading path for optional fields in
`cache_opt_field_memory_v2`. When a manifest file is provided in the
config, the function now retrieves field data directly from the manifest
using `GetFieldDatasFromManifest` instead of reading from segment insert
files. This enables storage v2 compatibility for building indexes with
optional fields.


___

### **PR Type**
Enhancement


___

### **Description**
- Add manifest-based data loading for optional fields in index building

- Support storage v2 compatibility via `GetFieldDatasFromManifest`
function

- Enable PK isolation optional field handling without segment insert
files


___

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-23 14:55:21 +08:00
Buqian Zheng
674ac8a006
enhance: fix IsMmapSupported for stl sort (#46472)
issue: https://github.com/milvus-io/milvus/issues/44399

this PR also adds `ByteSize()` methods for scalar indexes. currently not
used in milvus code, but used in scalar benchmark. may be used by
cachinglayer in the future.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Improved and standardized memory-size computation and caching across
index types so reported index footprints are more accurate and
consistent.

* **Chores**
* Ensured byte-size metrics are refreshed immediately after index
build/load operations to keep memory accounting in sync with runtime
state.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-12-23 13:27:18 +08:00
XuanYang-cn
99b53316e5
enhance: Set latestDeletePos from L0 segments to bound L1 selection (#46436)
This commit refines L0 compaction to ensure data consistency by properly
setting the delete position boundary for L1 segment selection.

Key Changes:
1. L0 View Trigger Sets latestDeletePos for L1 Selection
2. Filter L0 Segments by Growing Segment Position in policy, not in
views
3. Renamed LevelZeroSegmentsView to LevelZeroCompactionView
4. Renamed fields for semantic clarity: * segments -> l0Segments *
earliestGrowingSegmentPos -> latestDeletePos
5. Update Default Compaction Prioritizer to level

See also: #46434

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-12-23 11:55:19 +08:00
cai.zhang
5911cb44e0
enhance: Estimate index task slot using field size instead of segment size (#46275)
issue: #45186

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-23 11:23:22 +08:00
yihao.dai
5e525eb3bf
enhance: Retry reads from object storage on rate limit error (#46455)
This PR improves the robustness of object storage operations by retrying
both explicit throttling errors (e.g. HTTP 429, SlowDown, ServerBusy).
These errors commonly occur under high concurrency and are typically
recoverable with bounded retries.

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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Configurable retry support for reads from object storage and improved
mapping of transient/rate-limit errors.
* Added a retryable reader wrapper used by CSV/JSON/Parquet/Numpy import
paths.

* **Configuration**
  * New parameter to control storage read retry attempts.

* **Tests**
* Expanded unit tests covering error mapping and retry behaviors across
storage backends.
* Standardized mock readers and test initialization to simplify test
setups.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-12-23 11:03:18 +08:00
foxspy
ab03521588
fix: fix chunk iterator merge order (#46461)
issue: #46349 
When using brute-force search, the iterator results from multiple chunks
are merged; at that point, we need to pay attention to how the metric
affects result ranking.

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2025-12-23 10:33:17 +08:00
Buqian Zheng
1a7ca339a5
feat: expose the Go expr parser to C++ and embed into libmilvus-core.so (#45703)
generated a library that wraps the go expr parser, and embedded that
into libmilvus-core.so

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

see `internal/core/src/plan/milvus_plan_parser.h` for the exposed
interface

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Introduced C++ API for plan parsing with schema registration and
expression parsing capabilities.
* Plan parser now available as shared libraries instead of a standalone
binary tool.

* **Refactor**
* Reorganized build system to produce shared library artifacts instead
of executable binaries.
* Build outputs relocated to standardized library and include
directories.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2025-12-22 23:59:18 +08:00
Zhen Ye
7d6d279e9c
fix: set enable.auto.commit false to prevent from creating kafka consumer group (#46508)
### **User description**
issue: #46507

we use the assign/unassign api to manage the consumer manually, the
commit operation will generate a new consumer group which is not what we
want. so we disable the auto commit to avoid it, also see:
https://github.com/confluentinc/confluent-kafka-python/issues/250#issuecomment-331377925


___

### **PR Type**
Bug fix


___

### **Description**
- Disable auto-commit in Kafka consumer configuration

- Prevents unwanted consumer group creation from manual offset
management

- Clarifies offset reset behavior with explanatory comments


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Kafka Consumer Config"] --> B["Set enable.auto.commit to false"]
  B --> C["Prevent auto consumer group creation"]
  A --> D["Set auto.offset.reset to earliest"]
  D --> E["Handle deleted offsets gracefully"]
```



<details><summary><h3>File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>builder.go</strong><dd><code>Disable auto-commit and
add configuration comments</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

pkg/streaming/walimpls/impls/kafka/builder.go

<ul><li>Added <code>enable.auto.commit</code> configuration set to
<code>false</code> to prevent <br>automatic consumer group creation<br>
<li> Added explanatory comments for both <code>auto.offset.reset</code>
and <br><code>enable.auto.commit</code> settings<br> <li> Clarifies that
manual assign/unassign API is used for consumer <br>management</ul>


</details>


  </td>
<td><a
href="https://github.com/milvus-io/milvus/pull/46508/files#diff-4b5635821fdc8b585d16c02d8a3b59079d8e667b2be43a073265112d72701add">+7/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tbody></table>

</details>

___



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Bug Fixes
* Kafka consumer now reads from the earliest available messages and
auto-commit has been disabled to support manual offset management.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: chyezh <chyezh@outlook.com>
2025-12-22 21:07:18 +08:00
cai.zhang
21b0e5ca9d
enhance: Don't seal segments when only alter collection properties (#46488)
### **PR Type**
Enhancement


___

### **Description**
- Only flush and fence segments for schema-changing alter collection
messages

- Skip segment sealing for collection property-only alterations

- Add conditional check using messageutil.IsSchemaChange utility
function


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Alter Collection Message"] --> B{"Is Schema Change?"}
  B -->|Yes| C["Flush and Fence Segments"]
  B -->|No| D["Skip Segment Operations"]
  C --> E["Set Flushed Segment IDs"]
  D --> E
  E --> F["Append Operation"]
```



<details><summary><h3>File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>shard_interceptor.go</strong><dd><code>Conditional
segment sealing based on schema changes</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>


internal/streamingnode/server/wal/interceptors/shard/shard_interceptor.go

<ul><li>Added import for <code>messageutil</code> package to access
schema change detection <br>utility<br> <li> Modified
<code>handleAlterCollection</code> to conditionally flush and fence
<br>segments only for schema-changing messages<br> <li> Wrapped segment
flushing logic in <code>if
</code><br><code>messageutil.IsSchemaChange(header)</code> check<br>
<li> Skips unnecessary segment sealing when only collection properties
are <br>altered</ul>


</details>


  </td>
<td><a
href="https://github.com/milvus-io/milvus/pull/46488/files#diff-c1acf785e5b530e59137b21584cf567ccd9aeeb613fb3684294b439289e80beb">+9/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tbody></table>

</details>

___



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Optimized collection schema alteration to conditionally perform
segment allocation operations only when schema changes are detected,
reducing unnecessary overhead in unmodified collection scenarios.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-22 20:55:19 +08:00
Zhen Ye
2edc9ee236
enhance: support milvus version when coordinator startup (#46456)
issue: #46451

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Session versioning added to validate coordinator compatibility during
registration and active takeover.

* **Changes**
* Active–standby flow simplified: standby-to-active activation now
always enabled and initialized unconditionally.
* Registration uses version-aware transactions to ensure version
consistency during takeover.
  * Startup/health startup path streamlined.

* **Tests**
* Added version-key integration test; removed test for disabling
active-standby.
  * Updated flush test to assert rate-limiter errors occur.

* **Chores**
  * Removed centralized connection manager and its test suite.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-12-22 20:29:18 +08:00
Zhen Ye
341388479a
fix: test flush rate failure because of config modification (#46497)
### **User description**
issue: #46097

- the flush rate is modified into 4qps, so the testcase is fail.


___

### **PR Type**
Tests, Bug fix


___

### **Description**
- Replace sequential flush calls with concurrent requests to trigger
rate limiting

- Add sync.WaitGroup for concurrent goroutine execution

- Check for rate limit errors across multiple concurrent flush
operations

- Remove hardcoded error message expectation for flexibility


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Sequential Flush Calls"] -->|Replace with| B["Concurrent Flush Requests"]
  B -->|Use| C["sync.WaitGroup"]
  C -->|Validate| D["Rate Limit Errors"]
```



<details><summary><h3>File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>insert_test.go</strong><dd><code>Refactor flush rate
test to use concurrent requests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

tests/go_client/testcases/insert_test.go

<ul><li>Added <code>sync</code> package import for concurrent goroutine
synchronization<br> <li> Replaced sequential flush calls with 10
concurrent flush operations <br>using goroutines<br> <li> Implemented
WaitGroup to synchronize all concurrent flush requests<br> <li> Modified
error validation to check for rate limit errors across all
<br>concurrent attempts instead of expecting specific sequential
behavior<br> <li> Relaxed error message matching to only check for "rate
limit exceeded" <br>substring</ul>


</details>


  </td>
<td><a
href="https://github.com/milvus-io/milvus/pull/46497/files#diff-89a4ddfa15d096e6a5f647da0e461715e5a692b375b04a3d01939f419b00f529">+19/-4</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tbody></table>

</details>

___



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **Tests**
* Enhanced testing of concurrent flush operations to improve validation
of system reliability under concurrent load scenarios.

---

**Note:** This release contains internal testing improvements with no
direct user-facing feature changes.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: chyezh <chyezh@outlook.com>
2025-12-22 16:19:17 +08:00
aoiasd
5e28f45c5a
enhance: change highlight query keyword to highlight_query (#46360)
Instead of `queries`.
relate: https://github.com/milvus-io/milvus/issues/42589

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-12-22 11:43:18 +08:00
jiamingli-maker
b9fe8e9f9e
test: add HNSW_SQ test cases (#46428)
/kind improvement
/assign @yanliang567

Signed-off-by: zilliz <jiaming.li@zilliz.com>
2025-12-22 11:29:18 +08:00
sijie-ni-0214
89a002e12a
fix: truncate_collection status check and add database interceptor su… (#46430)
issue: https://github.com/milvus-io/milvus/issues/46166

Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
2025-12-21 19:19:17 +08:00
cai.zhang
de3050be54
doc: [skip e2e]Add design document for entity level ttl (#46406)
issue: #46033

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-21 19:13:17 +08:00
yihao.dai
32809c1053
fix: Remove stale proxy clients on rewatch etcd (#46398)
AddProxyClients now removes clients not in the new snapshot before
adding new ones. This ensures proper cleanup when ProxyWatcher re-watche
etcd.

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-12-21 19:11:16 +08:00
yihao.dai
d03b9cc052
enhance: Align the monitoring of last_replicated_time_tick with wal_last_confirm_time_tick (#46469)
issue: https://github.com/milvus-io/milvus/issues/46116

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-12-21 19:03:17 +08:00
tinswzy
9345caa135
fix: call truncate when checkpoint is persisted (#46382)
issue: #44434

Signed-off-by: tinswzy <zhenyuan.wei@zilliz.com>
2025-12-21 19:01:17 +08:00
nico
bfc33130be
enhance: remove rbac pipeline in nightly (#46447)
Signed-off-by: nico <cheng.yuan@zilliz.com>
2025-12-20 12:39:16 +08:00
nico
51350f4ef8
test: optimize ci test about compaction and flush (#46097)
Signed-off-by: nico <cheng.yuan@zilliz.com>
2025-12-20 12:37:21 +08:00
congqixia
11c027ad81
fix: [Loon] pass mmap directory path to ManifestGroupTranslator (#46471)
Related to #44956

When loading column groups with mmap enabled, the
ManifestGroupTranslator needs the mmap directory path to properly handle
memory-mapped data loading. This change retrieves the root path from
LocalChunkManagerSingleton and passes it to the translator during
construction.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-20 12:25:17 +08:00
congqixia
6a15a08060
fix: set ManifestPath in GetRecoveryInfoV2 response (#46470)
Add ManifestPath field to SegmentInfo in GetRecoveryInfoV2 response,
enabling QueryCoord to detect manifest path changes and trigger segment
reopen for storage v2 incremental updates.

Related to #46394

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-19 22:21:19 +08:00
XuanYang-cn
0507db2015
feat: Add force merge (#45556)
See also: #46043

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-12-19 18:03:18 +08:00
Spade A
ab9bec0a6d
fix: some fixes for ngram index (#46405)
issue: https://github.com/milvus-io/milvus/issues/42053

The splitted literals in `match` execution should be handled in `and`
manner rather than `or`.

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-12-19 16:13:19 +08:00
Spade A
ad8aba7cb4
feat: impl ComputePhraseMatchSlop for compute min slop for phrase match query (#45892)
issue: https://github.com/milvus-io/milvus/issues/45890

ComputePhraseMatchSlop accepts three pararms:
1. A string: query text
2. Some trings: data texts
3. Analyzer params,

Slop will be calculated for the query text with each data text in the
context of phrase match where they are tokenized with tokenizer with
analyzer params.

So two array will be returned:
1. is_match: is phrase match can sucess
2. slop: the related slop if phrase match can sucess, or -1 is cannot.

---------

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2025-12-19 16:03:18 +08:00
sparknack
27e14d034f
fix: prohibit hot-reloading of tiered storage parameters (#46437)
issue: #46443

Add `Forbidden: true` to all tiered storage related parameters to
prevent runtime configuration changes via etcd. These parameters are
marked as refreshable:"false" but that tag was only documentation - the
actual prevention requires the Forbidden field.

Without this fix, if tiered storage parameters are modified at runtime:
- Go side would read the new values dynamically
- C++ caching layer would still use the old values (set at InitQueryNode
time)
- This mismatch could cause resource tracking issues and anomalies

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2025-12-19 14:59:16 +08:00
congqixia
0425336635
fix: [skip e2e] resolve flaky TestKeyLockDispatcher unit test (#46454)
Related to #46453

The test was flaky because Submit() returns a Future and executes
asynchronously. The test was setting sig=true immediately after Submit()
returned, but the task's Run() might not have completed yet, causing
mock expectation failures.

Fix by calling future.Await() to wait for task execution to complete
before signaling. Also remove dead commented code.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-19 14:07:19 +08:00
junjiejiangjjj
617a77b0bd
enhance: Add embedding model and schema field type checks (#46421)
https://github.com/milvus-io/milvus/issues/46415

- Add output type validation when creating functions
- Fix improper error handling in bulk insert tasks

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
2025-12-19 11:05:19 +08:00
aoiasd
7e4f87e351
fix: Init analyzer at delegator for all field with enable analyzer (#46361)
To support text match highlight
relate: https://github.com/milvus-io/milvus/issues/46308

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-12-19 10:23:18 +08:00
congqixia
80fff56364
enhance: Bump etcd in pkg go.mod (#46420)
Related to #44614
Previous PR: #44666

Bump etcd version in pkg/go.mod to 3.5.23 and update test code
accordingly

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-18 16:13:16 +08:00
congqixia
bf838eea5d
enhance: set dynamic field as nullable with default empty JSON (#46419)
Set the auto-appended dynamic field to be nullable with a default value
of empty JSON object `{}`. This allows collections with dynamic schema
to handle rows that don't have any dynamic fields more gracefully,
avoiding potential null reference issues when the dynamic field is not
explicitly set during insert.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-18 15:15:17 +08:00
congqixia
1414065860
feat: query coord support segment reopen when manifest path changes (#46394)
Related to #46358

Add segment reopen mechanism in QueryCoord to handle segment data
updates when the manifest path changes. This enables QueryNode to reload
segment data without full segment reload, supporting storage v2
incremental updates.

Changes:
- Add ActionTypeReopen action type and LoadScope_Reopen in protobuf
- Track ManifestPath in segment distribution metadata
- Add CheckSegmentDataReady utility to verify segment data matches
target
- Extend getSealedSegmentDiff to detect segments needing reopen
- Create segment reopen tasks when manifest path differs from target
- Block target update until segment data is ready

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-17 22:15:16 +08:00
Feilong Hou
a7eb327746
test: fix unstable timestamptz test cases (#46403)
Issue: #46333 

test: re-write convert timestamp logic to cover daylight saving time

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-17 21:13:16 +08:00
Zhen Ye
7c575a18b0
enhance: support AckSyncUp for broadcaster, and enable it in truncate api (#46313)
issue: #43897
also for issue: #46166

add ack_sync_up flag into broadcast message header, which indicates that
whether the broadcast operation is need to be synced up between the
streaming node and the coordinator.
If the ack_sync_up is false, the broadcast operation will be acked once
the recovery storage see the message at current vchannel, the fast ack
operation can be applied to speed up the broadcast operation.
If the ack_sync_up is true, the broadcast operation will be acked after
the checkpoint of current vchannel reach current message.
The fast ack operation can not be applied to speed up the broadcast
operation, because the ack operation need to be synced up with streaming
node.
e.g. if truncate collection operation want to call ack once callback
after the all segment are flushed at current vchannel, it should set the
ack_sync_up to be true.

TODO: current implementation doesn't promise the ack sync up semantic,
it only promise FastAck operation will not be applied, wait for 3.0 to
implement the ack sync up semantic. only for truncate api now.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-12-17 16:55:17 +08:00
congqixia
46c14781be
enhance: support useLoonFFI flag in import workflow (#46363)
Related to #44956

This change propagates the useLoonFFI configuration through the import
pipeline to enable LOON FFI usage during data import operations.

Key changes:
- Add use_loon_ffi field to ImportRequest protobuf message
- Add manifest_path field to ImportSegmentInfo for tracking manifest
- Initialize manifest path when creating segments (both import and
growing)
- Pass useLoonFFI flag through NewSyncTask in import tasks
- Simplify pack_writer_v2 by removing GetManifestInfo method and relying
on pre-initialized manifest path from segment creation
- Update segment meta with manifest path after import completion

This allows the import workflow to use the LOON FFI based packed writer
when the common.useLoonFFI configuration is enabled.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-17 16:35:16 +08:00
zhagnlu
52026cf07e
enhance: change jemalloc monitor from compile-time to runtime (#46377)
#46133

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
2025-12-17 16:17:16 +08:00
congqixia
21ed1fabfd
feat: support reopen segment for data/schema changes (#46359)
issue: #46358

This PR implements segment reopening functionality on query nodes,
enabling the application of data or schema changes to already-loaded
segments without requiring a full reload.

### Core (C++)

**New SegmentLoadInfo class**
(`internal/core/src/segcore/SegmentLoadInfo.h/cpp`):
- Encapsulates segment load configuration with structured access
- Implements `ComputeDiff()` to calculate differences between old and
new load states
- Tracks indexes, binlogs, and column groups that need to be loaded or
dropped
- Provides `ConvertFieldIndexInfoToLoadIndexInfo()` for index loading

**ChunkedSegmentSealedImpl modifications**:
- Added `Reopen(const SegmentLoadInfo&)` method to apply incremental
changes based on computed diff
- Refactored `LoadColumnGroups()` and `LoadColumnGroup()` to support
selective loading via field ID map
- Extracted `LoadBatchIndexes()` and `LoadBatchFieldData()` for reusable
batch loading logic
- Added `LoadManifest()` for manifest-based loading path
- Updated all methods to use `SegmentLoadInfo` wrapper instead of direct
proto access

**SegmentGrowingImpl modifications**:
- Added `Reopen()` stub method for interface compliance

**C API additions** (`segment_c.h/cpp`):
- Added `ReopenSegment()` function exposing reopen to Go layer

### Go Side

**QueryNode handlers** (`internal/querynodev2/`):
- Added `HandleReopen()` in handlers.go
- Added `ReopenSegments()` RPC in services.go

**Segment interface** (`internal/querynodev2/segments/`):
- Extended `Segment` interface with `Reopen()` method
- Implemented `Reopen()` in LocalSegment
- Added `Reopen()` to segment loader

**Segcore wrapper** (`internal/util/segcore/`):
- Added `Reopen()` method in segment.go
- Added `ReopenSegmentRequest` in requests.go

### Proto

- Added new fields to support reopen in `query_coord.proto`

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-17 15:49:16 +08:00
groot
d63ec2d8c6
fix: Enable search iterator for binary vector BIN_FLAT (#46340)
issue: https://github.com/milvus-io/milvus/issues/46339
https://github.com/milvus-io/milvus/discussions/46326

Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-12-17 14:13:16 +08:00
Chun Han
f0265dde18
fix: catch exception from LoadWithStrategy(#46380) (#46381)
related: #46380

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2025-12-17 11:37:17 +08:00
liliu-z
28061ec2f4
enhance: eliminate race condition in TestTargetObserver causing intermitt… (#46375)
This commit addresses an intermittent test failure in TestTargetObserver
with a mock panic error.

Problem:
--------
The original test TestTriggerUpdateTarget was a monolithic test that
cleared and recreated mock expectations mid-test execution. This created
a race condition:

1. Background goroutine in TargetObserver runs every 3 seconds, calling
broker.ListIndexes() and broker.DescribeCollection()
2. Test cleared all mock expectations at line 200 to prepare for next
phase
3. Test only re-mocked GetRecoveryInfoV2, leaving ListIndexes unmocked
4. If background goroutine triggered during this ~0.01s window (lines
200-213), it would call the unmocked ListIndexes() method, causing panic
and timeout

Error observed:
```
panic: test timed out after 10m0s
mock: I don't know what to return because the method call was unexpected.
Either do Mock.On("ListIndexes").Return(...) first, or remove the call.
```

Solution:
---------
Split the monolithic test into two independent test cases:

1. TestInitialLoad_ShouldNotUpdateCurrentTarget
   - Tests that CurrentTarget remains empty during initial load
   - Verifies the two-phase update mechanism works correctly

2. TestIncrementalUpdate_WithNewSegment
   - Tests incremental updates when new segments arrive
   - Properly sets up ALL required mocks before Eventually() calls
   - Lines 241-242 now include ListIndexes and DescribeCollection mocks

Benefits:
---------
- Eliminates race condition entirely (no mid-test mock clearing)
- Better test isolation and maintainability
- Clearer test intent with descriptive names
- Tests can run independently and in parallel
- Follows FIRST principles (Fast, Isolated, Repeatable, Self-validating,
Timely)

Signed-off-by: Li Liu <li.liu@zilliz.com>
2025-12-17 11:35:16 +08:00
congqixia
efa7ccdf81
fix: pass manifest path when loading growing segments (#46378)
Related to #44956

Pass ManifestPath field to SegmentLoadInfo when loading growing segments
in loadGrowingSegments function. This ensures storage v2 can properly
locate segment data via manifest path, consistent with other segment
loading paths.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-17 10:19:15 +08:00
wei liu
c1844d2aae
test: Temporarily disable partialResultCounter assertion in flaky tests (#46364)
issue: #46352

Comment out partialResultCounter assertions in partial search tests due
to concurrent issue between segment_checker and leader_checker during
heartbeat (500ms). This assertion sometimes fails because partial
results may be returned unexpectedly before segments are properly
distributed.

Affected tests:
- TestSingleNodeDownOnSingleReplica
- TestAllNodeDownOnSingleReplica
- TestSingleNodeDownOnMultiReplica
- TestPartialResultRequiredDataRatioTooHigh
- TestSkipWaitTSafe

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-12-16 17:29:16 +08:00
XuanYang-cn
0bbb134e39
feat: Enable to backup and reload ez (#46332)
see also: #40013

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2025-12-16 17:19:16 +08:00
wei liu
ac23beefb5
fix: ensure all channels synced before updating current target (#46348)
issue: #46087, #46327

The previous implementation only checked if there were any ready
delegators before updating the current target. This could lead to
partial target updates when only some channels had ready delegators.

This regression was introduced by #46088, which removed the check for
all channels being ready. This fix ensures that
shouldUpdateCurrentTarget returns true only when ALL channels have been
successfully synced, preventing incomplete target updates that could
cause query inconsistencies.

Added unit tests to cover:
- All channels synced scenario (should return true)
- Partial channels synced scenario (should return false)
- No ready delegators scenario (should return false)

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-12-16 14:45:17 +08:00
aoiasd
df80f54151
feat: support use user's file as dictionary for analyzer filter (#46145)
relate: https://github.com/milvus-io/milvus/issues/43687

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-12-16 11:45:16 +08:00
congqixia
bb2a08ed71
enhance: pass manifest path to stats task for storage v2 support (#46350)
Related #44956

Add manifest_path field to CreateStatsRequest and propagate it through
the stats task pipeline. This enables stats tasks and text index
building to access segment manifest for storage v2 format operations.

- Add manifest_path field to CreateStatsRequest proto
- Set ManifestPath from segment metadata in DataCoord
- Pass manifest to BuildIndexInfo in stats task builder
- Include manifest in compaction text index creation

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-16 11:11:16 +08:00
yihao.dai
889505872a
enhance: Return FlushAllMsg in response (#46347)
issue: https://github.com/milvus-io/milvus/issues/45919

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2025-12-16 10:35:16 +08:00
Zhen Ye
675a6b9ba0
fix: illegal reference count of record in binlog writer (#46344)
issue: #46205

Signed-off-by: chyezh <chyezh@outlook.com>
2025-12-15 22:51:15 +08:00
Lanqing Yang
3e15604f2e
fix: use rlock for pinindex (#45932)
fixes: https://github.com/milvus-io/milvus/issues/45934
pinIndex is a const and only do read operations rlock would be the right
choice for performance

Signed-off-by: Lanqing Yang <lanqingy93@gmail.com>
2025-12-15 22:33:16 +08:00