Commit Graph
24073 Commits
Author SHA1 Message Date
congqixiaandGitHub 5aee61bff0 enhance: Bump milvus & proto to v2.6.18 (#50254)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pkg/v2.6.18 v2.6.18
2026-06-03 11:18:18 +08:00
sparknackandGitHub a32195a1d3 enhance: [2.6] bump knowhere version (#50232)
issue: #42937

Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
2026-06-02 20:04:19 +08:00
XuanYang-cnandGitHub 06d3a19939 fix: stored_index_files_size gauge tracks active indexes only (#49380)
pr: #49089

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2026-06-02 15:40:17 +08:00
99d0a7303b enhance: [cp2.6] Optimize dropped segment index GC (#49728) (#50172)
Cherry-pick of #49728 onto 2.6, adapted for the branch.

issue: #49585
pr: #49728

## Original change
- Move dropped segment index cleanup into the dropped segment recycle
path: when recycling a dropped segment, delete segment object files and
segment index files first, then remove segment-index meta, and finally
remove segment meta. If any step fails, the later state is preserved for
the next GC cycle to retry.
- Add `GetAllSegmentIndexes` so dropped segment GC can clean
segment-index meta even when the field index has already been marked
deleted and would be filtered by `GetSegmentIndexes`.
- Keep orphan index file/meta GC as a fallback for old data and partial
failure recovery.

## 2.6 adaptations (features absent on this branch)
- Dropped the snapshot-based GC protection path (`GetSnapshotMeta` /
`IsBuildIDGCBlocked` / `snapshotMeta`), which does not exist on 2.6.
- Dropped the `StorageV3` / packed manifest handling in
`removeDroppedSegmentFiles`; 2.6 only has `StorageV1`/`StorageV2`.
- `getDroppedSegmentIndexFiles` now returns `(segIndexes, indexFiles)`
without the snapshot-blocked flag.
- Backported only the PR-added tests that apply to 2.6 (snapshot/V3
tests dropped); index file path assertions use
`metautil.BuildSegmentIndexFilePath`.

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 12:20:17 +08:00
XuanYang-cnandGitHub 8ac44fc8ca fix: align target size compaction selection (#50159)
issue: #49991
pr: #50114

Target-size manual compaction should use the same candidate rules as
normal manual compaction. Share the candidate predicate so force merge
only plans healthy, flushed, visible, sorted, non-L0, non-L2 segments
and skips compacting, importing, or snapshot-protected segments.

Signed-off-by: yangxuan <xuan.yang@zilliz.com>

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2026-06-02 09:52:16 +08:00
2ea7a241ae enhance: [2.6] extend arrow IO thread pool config to DataNode init (#50100)
issue: #50098
pr: #50099

## Summary

2.6 backport of #50099. Cherry-pick of:
- `cf6dc32687` enhance: extend arrow IO thread pool config to DataNode
init
- `dcd82c723a` enhance: raise dataCoord.import.fileNumPerSlot default
from 1 to 4

Conflict resolved: import paths re-pointed from `pkg/v3/*` (master) to
`pkg/v2/*` (2.6). No behavior change beyond what's in the master PR.

## Why

See #50098 / #50099 for the full reproducer and analysis. Production
2.6.x cluster hit a 1.5M-row sort compaction stalled for >1 hour while
CPU sat at 12% — root cause is the DataNode Arrow IO thread pool being
stuck at Arrow's hard-coded default of 8 threads, with
`common.arrow.ioThreadPoolCoefficient` introduced in 2.6.16 (#49554)
having no effect on DataNode because the wiring was never extended
there.

## Test plan

- [x] Cherry-pick clean (only conflict was pkg/v3 → pkg/v2 import paths)
- [x] `gofmt` clean
- [ ] CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 17:26:17 +08:00
c9d6915a52 fix: [cp2.6]ack stale alter-load-config on dropped-sentinel channel (#50162)
Cherry-pick from master (PR still open)

pr: #50161
issue: #49996

## Summary

Pre-emptive cherry-pick of master PR #50161 to 2.6. Original PR is
currently still open on master; this CP PR is kept in sync with the
master PR.

Adjustments from master: `pkg/v3/log`, `pkg/v3/streaming/util/message`,
and `pkg/v3/util/merr` imports rewritten to `pkg/v2/...` to match the
2.6 branch convention. No logic changes.

See #50161 for the full root-cause writeup (CDC-replicated
`AlterLoadConfig` retry loop blocked by dropped-channel sentinel,
blocking rootcoord meta cleanup on the secondary).

This revision re-picks the latest master commit, which additionally adds
a `querycoordv2` unit test for `alterLoadConfigV2AckCallback`
(dropped-sentinel ack-with-no-op + generic-error propagation) and maps
`ErrChannelDroppedSentinel` to `NoReplicaAvailable` in `merr.oldCode`.

## Verification

- [x] Cherry-pick diff matches master PR diff (only `pkg/v3` → `pkg/v2`
import-path substitutions and hunk line-number drift; verified
line-by-line)
- [x] No conflict markers remain
- [x] File count and line counts match original commit (7 files,
+117/-7)
- [ ] make static-check (skipped by cherry-pick workflow)
- [ ] CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 16:58:20 +08:00
aoiasdandGitHub 0fa67d88a6 fix: [2.6] avoid panic for non-point WKT validation (#49719) (#50205)
pr: https://github.com/milvus-io/milvus/pull/49719
relate: https://github.com/milvus-io/milvus/issues/49692

## Summary
Avoid panic when ST_DWITHIN validates a legal non-POINT WKT by returning
a point-only validation error instead.
Add a regression test for non-POINT WKT validation.

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2026-06-01 15:12:17 +08:00
pymilvus-botandGitHub 9c3b995dbd test: Increase PyMilvus version to 2.6.15rc6 from 2.6 for 2.6 branch (#50190)
Automated bump from pymilvus 2.6 branch to milvus 2.6 branch. Updates
tests/python_client/requirements.txt.

Signed-off-by: pymilvus-bot <pymilvus@zilliz.com>
2026-06-01 14:10:16 +08:00
zhuwenxingandGitHub 51524f211f test: use rjieba for jieba tokenizer tests (#50202)
pr: #50180

## What

Backport #50180 to the 2.6 branch. Switch Python test-side Jieba usage
from the Python `jieba` package to `rjieba`, the Python binding for
`jieba-rs`.

## Changes

- Replace Python test requirements from `jieba==0.42.1` to
`rjieba==0.1.11`
- Update Python client and REST test helpers to call `rjieba.cut`,
`rjieba.cut_for_search`, and `rjieba.cut_all`
- Update analyzer expected-token helper to use `rjieba` for supported
mode/hmm cases
- Keep custom-dictionary validation focused on analyzer output because
`rjieba` does not expose dynamic dictionary APIs like Python
`jieba.add_word` or `set_dictionary`
- Format changed Python test files with Ruff

## Test

- `ruff check` on changed Python files
- `ruff format --check --diff` on changed Python files
- `python -m py_compile` on changed Python files

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2026-06-01 14:08:16 +08:00
3a73ddab69 fix: [2.6] correct fullMethod for OperatePrivilegeV2 REST endpoints (#48537) (#50132)
issue: #48115
pr: #48537

Cherry-pick of #48537 (master) to the 2.6 branch. Same one-line root
cause; production-confirmed on a `v2.6.12-hotfix4` cluster where REST
`/v2/vectordb/roles/grant_privilege_v2` is rejected by the Cloud
`denyAPI` hook because the handler hands the legacy `OperatePrivilege`
fullMethod into `wrapperProxy`.

Also adds a regression test `TestGrantPrivilegeV2_FullMethodMismatch`
that injects a recording `hook.Hook` via `hookutil.SetTestHook`, fires
the V2 grant route, and asserts the captured fullMethod is
`OperatePrivilegeV2` — without this guardrail a future copy-paste
regression would silently re-introduce the Cloud-blocking behavior.

Companion hotfix PR: #50133

---------

Signed-off-by: sunby <sunbingyi1992@gmail.com>
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
Co-authored-by: Bingyi Sun <sunbingyi1992@gmail.com>
2026-06-01 13:54:16 +08:00
zhuwenxingandGitHub 0abab9cf85 fix: size field bitsets by field id range (#50149)
issue: #50107
pr: #50141

Cherry-pick the StructArray vector search fix to 2.6.

This fixes StructArray vector searches where StructArray parent fields
create gaps in user field IDs, while query/sealed-segment bitsets were
sized by schema field count.

Validation:
- uvx ruff==0.15.11 format --check --diff
tests/python_client/milvus_client/test_milvus_client_struct_array.py
- python3 -m py_compile
tests/python_client/milvus_client/test_milvus_client_struct_array.py

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2026-06-01 10:52:18 +08:00
marcelo-cjlandGitHub 7f00e2c1b2 fix: cherrypick lazy nullable vector offset mapping fixes (#50127)
## Summary
- Cherrypick nullable vector lazy offset mapping fixes from #50085 to
2.6.
- Keep growing nullable-vector offset mapping stable during valid-data
updates and use lock-free sealed offset mapping.
- Batch nullable-vector bitset/offset conversion and skip conversion for
fast-path/non-nullable cases.
- Store nullable fixed-width vector Arrow schema fields as binary with
dimension metadata.

pr: #50085
issue: #50122

Note: source master PR #50085 is currently open, so the release gate may
wait for it to merge.

## Test plan
- [x] `git diff --check upstream/2.6..HEAD`
- [x] `make cppcheck`
- [x] `env CONAN_CMD=/tmp/conan1 make build-cpp-with-unittest`
- [x] `env
LD_LIBRARY_PATH=cmake_build/src:cmake_build/lib:internal/core/output/lib
cmake_build/bin/all_tests
--gtest_filter=OffsetMapping.*:SchemaTest.NullableFixedWidthVectorUsesBinaryInArrowSchemas:ChunkedColumnInterfaceTest*.*:ChunkedColumnTest.*:ChunkedColumnGroupTest.*:SearchOnSealedColumnBitsetLifetime.*:SearchOnSealedIndexNullableNoFilter.*:SearchOnSealedIndexNullableIteratorNoFilter.*`

Signed-off-by: marcelo-cjl <marcelo.chen@zilliz.com>
2026-05-31 08:18:15 +08:00
Buqian ZhengandGitHub 4641646204 fix: [2.6] keep field data index computation monotonic (#50117)
issue: https://github.com/milvus-io/milvus/issues/42148
pr: #50116

this is to fix
https://github.com/milvus-io/milvus/pull/50095#discussion_r3309848315

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2026-05-29 21:12:16 +08:00
Buqian ZhengandGitHub 579dd9b5a1 fix: [2.6] fix incorrect sliced index sidecar loading (#50167)
issue: https://github.com/milvus-io/milvus/issues/50150
pr: #50166

---------

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2026-05-29 18:00:35 +08:00
yanliang567andGitHub a640902f4a test: [cp2.6] add container-kill chaos coverage (#49800) (#50171)
## What changed

- Backport master PR #49800 to 2.6.
- Add missing container-kill Chaos Mesh YAMLs for Milvus components and
dependencies.
- Add selected-pod container-kill template for etcd leader/follower
chaos cases.
- Resolve container names dynamically before creating container-kill
resources.

pr: #49800
Fixes #49798

## Validation

- python3 -m py_compile tests/python_client/chaos/test_chaos_apply.py
tests/python_client/chaos/test_chaos_apply_to_determined_pod.py
tests/python_client/utils/util_k8s.py
- ruby -ryaml parsed 17 container-kill/template YAML files
- git diff --check origin/2.6..HEAD

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
2026-05-29 13:10:15 +08:00
sijie-ni-0214andGitHub a17c7bc756 fix: [cp2.6] Avoid balance batch limit for forced segment assignment (#50152)
Cherry-pick from master
pr: #49921

issue: #49920

## Test Plan

- `gofumpt -l internal/querycoordv2/assign/assign_policy_roundrobin.go
internal/querycoordv2/assign/assign_policy_roundrobin_test.go
internal/querycoordv2/assign/assign_policy_rowcount.go
internal/querycoordv2/assign/assign_policy_rowcount_test.go`
- `git diff --check`
- `zsh -c 'source scripts/setenv.sh && go test -v -count=1 -tags
dynamic,test -gcflags="all=-N -l" -ldflags="-r
${MILVUS_WORK_DIR}/cmake_build/lib -r
${MILVUS_WORK_DIR}/internal/core/output/lib"
./internal/querycoordv2/assign -timeout 300s'`
- `zsh -lc 'source scripts/check_build.sh'`
- `make build-go`

Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
2026-05-29 07:00:15 +08:00
368d803913 enhance: backport pulsar-client-go v0.19.0 to 2.6 (#49948)
## Summary
- Backport #49933 to the 2.6 branch.
- Bump `github.com/apache/pulsar-client-go` to v0.19.0.
- Replace `streamnative/pulsarctl` admin usage with `pulsar-client-go`'s
`pulsaradmin`.

issue: #49932
pr: #49933

## Test plan
- [ ] Not run per maintainer request; rely on CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
Co-authored-by: zhenshan.cao <zhenshan.cao@zilliz.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 04:10:17 +08:00
zhuwenxingandGitHub 7316e6d4c1 test: [cp2.6] add struct array element search coverage (#50148)
pr: #50146

## Summary

Copy the 2.6 test coverage for the struct array search features that
were backported:

- element-level search on struct array vector fields
- hybrid search combining element-level search and a normal vector field
- collapse correctness coverage adapted from the master PR

This PR intentionally does not add `element_filter` or `MATCH` cases
because those features are not included in the 2.6 backport scope.

## Verification

Tested against latest 2.6 daily build:

- Milvus image: `harbor.milvus.io/manta/milvus:2.6-20260528-beb5662`
- Server version: `2.6-20260528-beb56622c9`

Commands run:

```bash
python -m py_compile tests/python_client/milvus_client/test_milvus_client_struct_array_element_search.py
pytest -c pytest.ini milvus_client/test_milvus_client_struct_array_element_search.py --host <host> --port 19530 --token <token> --tb=short
```

Result:

```text
7 passed
```

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2026-05-28 19:16:17 +08:00
foxspyandGitHub beb56622c9 enhance: [2.6] update knowhere version (#49705)
issue: #42937

/kind branch-feature

## Summary
- Update Knowhere dependency from v2.6.13 to v2.6.14.
- Use the Knowhere v2.6.14 tag from the 2.6 branch:
https://github.com/zilliztech/knowhere/tree/v2.6.14

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2026-05-28 10:06:15 +08:00
dfc2640ddd fix: [cp2.6]clear import segments NumOfRows when import task retries (#50070)
Cherry-pick from master PR #49986

pr: #49986
issue: #49985

## Summary

Cherry-picked from master PR #49986 (merged).

When a DataNode running an import task fails or returns `Retry`,
DataCoord
resets the task to `Pending` and reschedules it. Preallocated segment
IDs
are reused on retry, but `PickSegment` on the DataNode picks randomly,
so
the retried attempt can write to a different subset of preallocated
segments than the failed attempt. `NumOfRows` updates were
monotonic-only
and never cleared across attempts, leaving orphan segments with stale
`NumOfRows` but no persisted binlogs. Sort compaction later failed with
`unexpected row count` or EOF.

## Fix

- New operator `ResetImportingSegmentRows(segmentIDs ...int64)` in
`internal/datacoord/meta.go` — clears `NumOfRows` and `MaxRowNum` only
on
  segments still in `Importing` state.
- In `(*importTask).QueryTaskOnWorker`, call it on every preallocated
  segment **before** transitioning the task back to `Pending`.
- Orphan segments now have `NumOfRows = 0` after retry, so
  `createSortCompactionTask`'s zero-rows guard drops them.

## Verification

- [x] File count matches original PR (3 files, +107/-2)
- [x] Code changes verified (identical line-by-line diff vs master PR)
- [x] No conflict markers
- [ ] make static-check (skipped by cherry-pick workflow)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 01:52:16 +08:00
f674adafa7 feat: [2.6] impl StructArray -- support hybrid search for element-level search (#50095)
pr: #49799
issue: https://github.com/milvus-io/milvus/issues/42148
design doc: docs/design-docs/design_docs/20260306-struct.md

For hybrid search, we now support:
- plain topk emblist search
- plain topk element-level search where the search results will dedup
with row id and rerank with others

Not yet support:
- range search
- iterator search
- group by

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
Co-authored-by: Spade  A <71589810+SpadeA-Tang@users.noreply.github.com>
2026-05-27 18:20:26 +08:00
ee880c6543 feat: impl StructArray -- support element-level search for array of vector [2.6] (#49796)
issue: https://github.com/milvus-io/milvus/issues/42148
pr: https://github.com/milvus-io/milvus/pull/45830
design doc: docs/design-docs/design_docs/20260306-struct.md

It cherry picks element-level search only with out element-level filter.

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
Co-authored-by: Buqian Zheng <zhengbuqian@gmail.com>
2026-05-27 12:28:26 +08:00
Zhen YeandGitHub 8d68b40eeb test: [cp 2.6] add configurable chaos client timeouts (#50087)
issue: #48185
pr: #50086

- chaos tests: add pytest options to override search and query timeout
values used by the chaos checker

Signed-off-by: chyezh <chyezh@outlook.com>
2026-05-27 10:54:26 +08:00
nicoandGitHub 3d2591bf02 test: [cp2.6]Fix 2.6 nightly client test expectations (#50062)
pr: #49672
pr: #49833
pr: #48342

## Summary

Fix 2.6 nightly client test failures found in daily-ci-trigger build
230.

issue: #49671
issue: #49781
issue: #49992

## Changes

- Update add vector field nullable=false error expectation.
- Update describe_collection expected consistency level name.
- Loosen load replica invalid error expectation to match stack-trace
wrapped server errors.
- Fix missing res1 assignment in hybrid search range test.
- Update pymilvus 2.6 test dependency to 2.6.15rc2.

## Test Plan

- [x] Syntax check for modified Python test files with Python compile().

Signed-off-by: nico <cheng.yuan@zilliz.com>
2026-05-26 17:42:33 +08:00
marcelo-cjlandGitHub dbeea1eb31 fix: [cp2.6] enforce nullable vector compact data invariants (#49973)
## Summary
- Cherrypick nullable vector compact-storage invariant fixes from #49924
to 2.6.
- Enforce the compact nullable vector contract: `ValidData` tracks
logical rows, while vector payloads contain only valid physical rows.
- Cover the affected storage, import, proxy, index build, and segcore
paths with regression tests.

pr: #49924
issue: #49881

## Test plan
- [x] `git diff --check HEAD`
- [x] `cd pkg && go test ./util/funcutil ./util/typeutil ./mq/msgstream`
targeted nullable compact vector tests

Local full build/static checks were not completed in this workspace:
- `make build-cpp` was blocked by generated v3 proto imports and an
existing CMake generator-cache mismatch.
- `make static-check` was blocked by stale/generated canalyzer C header
mismatch.

Signed-off-by: marcelo-cjl <marcelo.chen@zilliz.com>
2026-05-26 09:42:31 +08:00
congqixiaandGitHub 1942b751f6 enhance: Bump client version to v2.6.5 (#50051)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
client/v2.6.5
2026-05-26 06:32:32 +08:00
Zhen YeandGitHub 4fef52e8a4 fix: [cp 2.6] retry delta log writes in sync task (#50030)
issue: #49998
pr: #50028

- syncmgr: route delta-log blob uploads through retry-aware object
storage writes
- syncmgr tests: cover transient delta-log write failures and
non-retryable write errors

Signed-off-by: chyezh <chyezh@outlook.com>
2026-05-26 05:54:31 +08:00
c4806af470 fix: [2.6] prevent node panic when unsupported types used as ClusteringKey … (#48263)
- **Bug 1 (MixCoord panic):** `compactionInspector.analyzeScheduler` was
never initialized in production code. When FloatVector is used as
ClusteringKey, the `doAnalyze()` path calls `analyzeScheduler.Enqueue()`
on a nil pointer → panic. Fixed by passing `analyzeScheduler` to
`newCompactionInspector`.
- **Bug 2 (DataNode round-robin panic):** `validateClusteringKey()` had
no field type whitelist, so JSON/Bool/Array passed schema validation.
During clustering compaction, `NewScalarFieldValue()` panics on
unsupported types. Fixed by adding `IsClusteringKeyType()` check to
reject unsupported types at collection creation time.

- [x] `TestIsClusteringKeyType` — verifies supported/unsupported type
classification
- [x] `TestClusteringKey` — new sub-tests for JSON, Bool, Array as
ClusteringKey (all rejected)
- [ ] Existing `TestClusteringKey` sub-tests (normal, multiple keys,
vector key) still pass
- [ ] `TestCompactionPlanHandler*` tests pass with updated
`newCompactionInspector` signature

issue: #47540
master pr: #48184  #48529

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-26 05:36:32 +08:00
tinswzyandGitHub 6f391f8eeb fix: [2.6] harden writer lifecycle transitions and support Azure mana… (#50012)
pr: #50011

related issue: 
- fix: harden writer lifecycle transitions to reject late writes during
finalize/close/fence/storage-failure states
- enhance: support Azure managed identity authentication for the storage
client

Signed-off-by: tinswzy <zhenyuan.wei@zilliz.com>
2026-05-26 05:32:35 +08:00
yihao.daiandGitHub 485387d001 fix: [cp2.6]refuse to build QueryCoord target when channel checkpoint is dropped sentinel (#50026)
Cherry-pick from master

pr: #50002
issue: #49996

## Summary

Cherry-picked from master PR #50002 (merged).

## Verification

- [x] File count matches original PR (5 files, +278/-4)
- [x] Per-file diff matches master PR after v2/v3 path normalization
- [x] No conflict markers
- [x] `pkg/util/funcutil` unit tests pass locally
(TestIsDroppedChannelCheckpoint, TestDroppedChannelCheckpointTimestamp)
- [ ] `make static-check` (skipped by cherry-pick workflow)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2026-05-26 01:54:36 +08:00
congqixiaandGitHub eee7889a60 fix: [2.6]correct QueryNode segment load span logging (#50032)
fixes #50031

Record the base data/index loading span before starting text index
loading so loadTextIndexesSpan no longer includes earlier segment load
work. This makes QueryNode segment load latency logs more accurate for
diagnosis.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2026-05-25 18:16:31 +08:00
congqixiaandGitHub e261ec51f4 fix: [2.6] isolate REST timeout middleware handler context (#49982) (#50006)
Cherry-pick from master
pr: #49982
Related to #49981

The REST timeout middleware could return a timeout response while the
handler goroutine continued using the original Gin context. Once Gin
recycled that context, late handler writes could race with a later
request and trigger concurrent map writes.

Run timeout-wrapped handlers with a copied Gin context and a fully
buffered response recorder instead. The original context and real
response writer now remain owned by the middleware goroutine, while
normal completion explicitly propagates selected metadata and commits
the recorder. Timeout closes the recorder and writes the 408 response
through the real writer, so late handler writes are discarded safely.

Add tests for recorder isolation, normal buffered commits, metadata and
abort propagation, late writes after timeout, and race validation of the
late-write timeout path.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2026-05-25 14:08:33 +08:00
nicoandGitHub 976e722c3c test: align nightly search checks with master[2.6] (#49997)
pr: #48347

Related master PRs: #48347, #48345, #48584, #48786
Related issue: #49992

## What this PR does

Backports the master-side Python client test fixes needed by the 2.6
Nightly failures:

- fixes dynamic-field spelling and output-field check setup in
search-by-PK/search-v2 cases
- aligns wildcard output-field metric checks with master
- updates TTL default coverage to use generated schema rows and
consistency-level checks from master
- updates output-field value checking for sparse vectors and byte-backed
vector fields

## Verification

- `python -m py_compile` on the four touched Python files: passed
- Targeted pytest against the 2.6 Nightly environment with `--host
10.104.21.115`: 9 passed, 1 failed

Known remaining failure:

- `test_search_by_pk_nullable_vector_field` still fails with
`MilvusException: vector data is not
schemapb.VectorField_SparseFloatVector`; tracked by #49992.

Signed-off-by: nico <cheng.yuan@zilliz.com>
2026-05-25 11:28:31 +08:00
Zhen YeandGitHub 41ecd57342 enhance: [cp 2.6] optimize QueryNode scheduler recovery performance from heavy load (#49926)
issue: #49707
pr: #49825

- QueryNode scheduler: add context-aware task admission, deadline
cleanup, queue duration tracking, and ready NQ metrics for read task
recovery under heavy load
- QueryNode task grouping: bound grouped NQ size, merge ratio, and
deadline gap so merged searches preserve latency constraints
- Proxy timeout middleware: propagate request deadlines through the
timeout context
- Metrics and config: add read task execution duration metrics and
2.6.17 scheduler/grouping defaults

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2026-05-23 21:40:31 +08:00
yanliang567andGitHub fcd078ee78 test: [cp2.6]Add nullable vector field coverage (#50001)
pr: #49649

Cherry-pick PR #49649 to 2.6.

Changes:
- Add nullable vector/search pagination coverage in 2.6 client v2 tests.
- Add nullable full-text search function input/output coverage.
- Add nullable struct array embedding-list boundary coverage.

Notes:
- Skipped the master sync merge commit from the source PR.
- The group-by nullable vector coverage already exists in the 2.6
milvus_client_v2 test file, so the deleted old-path conflict was
resolved by keeping 2.6 layout.

Signed-off-by: yanliang567 <82361606+yanliang567@users.noreply.github.com>
2026-05-22 18:52:31 +08:00
aoiasdandGitHub d9dd5f1b53 fix: [2.6] skip loading BM25 sparse vector fields (#49651) (#49975)
relate: https://github.com/milvus-io/milvus/issues/49650
pr: https://github.com/milvus-io/milvus/pull/49651

## Summary
Skip BM25 sparse vector fields in segcore ShouldLoadField decisions so
BM25 function outputs are not treated as loadable raw field data.

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2026-05-22 14:34:30 +08:00
0954a33ff8 test: [cp2.6] add partial update array op tests (ARRAY_APPEND/ARRAY_REMOVE) (#49819)
pr: #49689, 
#49770
issue: #49241, 
#49746

## Summary
Cherry-pick partial update array op test suite from master to 2.6:
- #49689: Core test coverage for ARRAY_APPEND/ARRAY_REMOVE across all
element types, error/validation scenarios, and boundary cases
- #49770: Sealed segment path tests with flush + release + load +
array_contains predicate verification

## Test plan
- [x] All 39 cases verified on master CI (e2e-default passed)
- [x] All 39 cases verified on 2.6 nightly (`2.6-20260514-bc760565`)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: lyyyuna <yiyang.li@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 22:24:33 +08:00
Zhen YeandGitHub c6e56ec5ad fix: [cp 2.6] pin requery to preferred replica (#49830)
issue: #49742
pr: #49826

- proxy search: propagate preferred shard leader hints through requery
workloads
- shard client: route preferred serviceable nodes outside balancer and
fall back to normal selection otherwise
- metrics: add shard-level preferred-node selection counters

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2026-05-21 19:54:33 +08:00
congqixiaandGitHub 50f74e3a66 enhance: [2.6] support HTTP/2 for proxy REST server (#49910) (#49964)
Cherry-pick from master
pr: #49910
Related to #49909

Enable h2c for the Gin REST server and advertise HTTP/2 through ALPN on
TLS REST listeners. Route shared-port HTTP/2 traffic through the REST
HTTP server so non-gRPC REST requests and gRPC requests can coexist on
the same plaintext port.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2026-05-21 11:58:29 +08:00
zhuwenxingandGitHub dcd78c17a7 test: upgrade 2.6 test runtime to Python 3.12 (#49940)
## What's changed

- Upgrade the 2.6 test Python runtime to Python 3.12 via
tests/.python-version, Dockerfiles, and CI shell env activation.
- Update Python client and REST v2 test dependencies for Python 3.12,
including numpy 2.x compatibility.
- Adapt test data generation and assertions for numpy 2.x API/overflow
behavior.
- Remove unused GitHub workflows and stale README links following the
master cleanup.

## Related master PRs

pr: #49378
pr: #49571

## Verification

- git diff --check
- bash -n tests/scripts/python-env.sh tests/scripts/ci-util.sh
tests/scripts/ci-util-4am.sh tests/scripts/ci_e2e.sh
tests/scripts/ci_e2e_4am.sh tests/scripts/ci_e2e_4am_without_restful.sh
tests/scripts/ci_e2e_with_restful.sh
- Parsed remaining .github/workflows/*.{yaml,yml}
- Python 3.12 pip check for python_client and restful_client_v2
environments
- py_compile for changed Python test files
- pytest --collect-only for representative python_client and
restful_client_v2 suites

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2026-05-21 10:50:29 +08:00
yanliang567andGitHub 1a3d10e20c test: [cp2.6]Fix assert_statistic false failures for low-frequency checkers (#49969)
pr: #49349

This cherry-picks the assert_statistic update from #49349 to 2.6. It
removes the strict total > 2 requirement for expected-success checkers,
so low-frequency chaos checkers can pass when they complete at least one
successful operation. total=0 remains a failure with a clearer
diagnostic.

Verification:
- python3 -m py_compile tests/python_client/chaos/chaos_commons.py
- uvx ruff@0.15.11 check tests/python_client/chaos/chaos_commons.py
- uvx ruff@0.15.11 format --check --diff
tests/python_client/chaos/chaos_commons.py
- inline dummy checker validation for total=1 success and total=0
failure

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
2026-05-21 10:28:29 +08:00
Zhen YeandGitHub e0a35fa2bc fix: [cp 2.6] defer drop collection observe in flusher (#49962)
issue: #49959
pr: #49961

- streaming flusher: only observe truncate collection before flusher
handling, keeping drop collection on the deferred observe path
- streaming flusher tests: cover drop collection cleanup ordering and
truncate collection early observe behavior

Signed-off-by: chyezh <chyezh@outlook.com>
2026-05-21 10:16:29 +08:00
sijie-ni-0214andGitHub dede44d684 enhance: [cp2.6] optimize ReplicaManager per-collection locking (#49956)
Cherry-pick from master
pr: #49389

issue: #48866

## Test Plan

- gofumpt -l internal/querycoordv2/job/job_update.go
internal/querycoordv2/meta/replica_manager.go
internal/querycoordv2/meta/replica_manager_helper.go
internal/querycoordv2/meta/replica_manager_test.go
internal/querycoordv2/meta/replica_visibility_test.go
internal/querycoordv2/observers/replica_observer.go
internal/querycoordv2/services_test.go
- git diff --check
- rm -rf cmake_build/thirdparty/milvus-proto && make
generated-proto-without-cpp
- docker compose -f
deployments/docker/dev/docker-compose-apple-silicon.yml up -d etcd
- zsh -c 'unset MILVUS_WORK_DIR && source scripts/setenv.sh && export
MILVUS_WORK_DIR=$(pwd) && go test -v -count=1 -tags dynamic,test
-gcflags="all=-N -l" -ldflags="-r ${MILVUS_WORK_DIR}/cmake_build/lib -r
${MILVUS_WORK_DIR}/internal/core/output/lib"
./internal/querycoordv2/meta ./internal/querycoordv2/job
./internal/querycoordv2/observers ./internal/querycoordv2 -timeout 300s'
- docker compose -f
deployments/docker/dev/docker-compose-apple-silicon.yml down

Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
2026-05-21 09:12:29 +08:00
sijie-ni-0214andGitHub 4771ac8c6c enhance: [cp2.6] improve querycoord task scheduling and dist cleanup (#49950)
Cherry-pick from master
pr: #49528

issue: #49512

## Test Plan

- git diff --check
- gofumpt -l internal/querycoordv2/dist/dist_controller_test.go
internal/querycoordv2/dist/dist_handler.go
internal/querycoordv2/dist/dist_handler_test.go
internal/querycoordv2/task/executor.go
internal/querycoordv2/task/mock_scheduler.go
internal/querycoordv2/task/scheduler.go
internal/querycoordv2/task/task_test.go
pkg/util/paramtable/component_param.go
pkg/util/paramtable/component_param_test.go
- CONAN_CMD=conan-1 make
- zsh -c 'source scripts/setenv.sh && go test -v -count=1 -tags
dynamic,test -gcflags="all=-N -l" -ldflags="-r
${MILVUS_WORK_DIR}/cmake_build/lib -r
${MILVUS_WORK_DIR}/internal/core/output/lib"
./internal/querycoordv2/task ./internal/querycoordv2/dist -timeout 600s'
- zsh -c 'cd pkg && go test -v -count=1 ./util/paramtable -timeout 300s'

---------

Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
2026-05-21 09:10:41 +08:00
sijie-ni-0214andGitHub dab7a55608 enhance: [cp2.6]Optimize QueryCoord ChannelDistManager collection filtering (#49927)
Cherry-pick from master
pr: #49587

## Summary

This PR cherry-picks QueryCoord ChannelDistManager filtering
optimizations to the 2.6 branch.

The change removes the global ChannelDistManager collection index and
reuses each node's collection-scoped channel index for collection
lookups. It also reduces temporary allocations in ChannelDist and
SegmentDist filtering paths.

## Code Changes

- Remove the global collectionIndex from ChannelDistManager.
- Use the unified GetByFilter path with WithCollectionID2Channel.
- Reuse per-node nodeChannels.collChannels for collection-scoped lookup.
- Reduce temporary allocations in dist manager filtering paths.
- Update QueryCoord callers and tests for the unified ChannelDist filter
path.

issue: #49511

## Test Plan

- git diff --check
- gofumpt -l $(git diff --name-only upstream/2.6..HEAD -- '*.go')
- CMAKE_POLICY_VERSION_MINIMUM=3.5 CONAN_CMD=conan-1 SKIP_3RDPARTY=1
make
- zsh -c 'source scripts/setenv.sh && go test -v -count=1 -tags
dynamic,test -gcflags="all=-N -l" -ldflags="-r
${MILVUS_WORK_DIR}/cmake_build/lib -r
${MILVUS_WORK_DIR}/internal/core/output/lib" ./internal/querycoordv2/...
-timeout 600s'

---------

Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
2026-05-21 09:06:29 +08:00
1ac4357e6d fix: [cp2.6] preserve dynamic field data during partial update (#49913)
issue:
https://github.com/milvus-io/milvus/issues/47857#issuecomment-4486581986
pr: #47725

Cherry-pick PR #47725 to 2.6.

Summary:
- Preserve dynamic $meta keys during partial update after schema
evolution.
- Deduplicate partial-update dynamic-field validation.
- Add Go and Python regression coverage.

Test:
- gofmt internal/proxy/task_upsert.go internal/proxy/task_upsert_test.go
internal/proxy/util.go
- git diff --check upstream/2.6...HEAD
- go test -tags dynamic,test -gcflags="all=-N -l" -count=1
./internal/proxy -run
"TestCheckDynamicFieldDataForPartialUpdate|TestUpsertTask_queryPreExecute_ArrayPartialOpSkipsGenericReplace"
(blocked locally: pkg-config cannot find milvus_core.pc or rocksdb.pc)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 16:08:29 +08:00
yanliang567andGitHub 8e5989cf37 test: [cp2.6]Fix chaos checker dimension mismatch and vector field limit handling (#49935)
Cherry-pick from master

pr: #48105
issue: #49934

## Summary

Backport the chaos checker fix from #48105 to the 2.6 branch.

This addresses the checker-side failures observed during the 2.6 chaos
run analysis:
- Hybrid search used one cached `self.dim` for all vector fields. After
`AddVectorFieldChecker` mutates the schema, a collection can contain
vector fields with different dimensions, so hybrid search must generate
vectors using each field's actual schema dimension.
- `AddVectorFieldChecker` hardcoded new FLOAT_VECTOR fields as `dim=32`,
which can diverge from the base collection schema.
- The previous vector-field-count precheck is unreliable under
concurrent schema mutation. This backport follows master and falls back
to insert-only when the server returns `maximum vector field`.

## Scope

This PR fixes only the Python chaos checker issue. The server crash
tracked in #49934 is a separate Milvus 2.6 server bug and should be
fixed by backporting #47151.

## Verification

- `python3 -m py_compile tests/python_client/chaos/checker.py`
- `git diff --check`

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
2026-05-20 14:10:30 +08:00
JamesandGitHub bae6111a61 fix: Fix dangling reference in IndexingRecord (#49937)
## What type of PR is this?

/kind bug

## What this PR does / why we need it:

Backport #47151 to 2.6.

Fix dangling reference in `IndexingRecord` after
`SegmentGrowingImpl::Reopen()` updates the schema object.

issue: #46656
pr: #47151

## Which issue(s) this PR fixes:

issue: #46656

## Special notes for your reviewer:

Cherry-picked from commit 882d7be8fe.

## Test report

- `git diff --check` passed for the backport changes.
- Checked changed files for unresolved conflict markers: none found.
- `make run-test-cpp filter='SchemaReopenTest.*'` could not complete
locally because `libmilvus-planparser.so` was not loadable from the
existing local C++ test binary.

Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
2026-05-20 13:58:29 +08:00
marcelo-cjlandGitHub 9e482574c2 fix: [2.6] skip default fill for non-nullable vector fields (#49918)
## Summary
- Reject absent non-nullable vector fields during sealed segment reopen
instead of silently installing an unsupported schema.
- Keep non-nullable vectors out of default-fill during finish load,
while asserting that field data or a vector index carrier is present.
- Add focused segcore coverage for reopen rejection, indexed
finish-load, and missing-carrier finish-load failure.

issue: #49896
issue: #49470

## Test plan
- [x] `git diff --check`
- [x] `make -C cmake_build all_tests`
- [x]
`LD_LIBRARY_PATH="$PWD/cmake_build/lib:$PWD/internal/core/output/lib"
./cmake_build/bin/all_tests
--gtest_filter='test_chunk_segment.ReopenRejectsAbsentNonNullableVectorField:test_chunk_segment.FinishLoadSkipsNonNullableVectorWithIndex:test_chunk_segment.FinishLoadRejectsMissingNonNullableVectorCarrier'`

Signed-off-by: marcelo-cjl <marcelo.chen@zilliz.com>
2026-05-20 11:54:29 +08:00