Backport of #49107 to 2.5. Since 2.5 uses Conan 1.x, adapts the
`CONAN_CMD` convention with an up-front 1.x version check that tells
developers whose default `conan` is 2.x (master setup) exactly how to
select a 1.x binary, rather than letting confusing 2.x argparse errors
propagate from `conan install`.
pr: #49107
issue: #49106
## Test plan
- [x] `make` with default `conan` already 1.x — unchanged behavior
- [x] `make` with default `conan` 2.x (master setup) — fails fast with
clear error
- [x] `CONAN_CMD=conan-1 make` — builds successfully
- [x] `CONAN_CMD=/nonexistent make` — fails with clear error
- [x] `CONAN_CMD=conan make` (points at 2.x) — fails with clear error
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
Compaction inherits StartPosition/DmlPosition from source segments via
getMinPosition without recalculating from actual data. The import
position bug (PR #47276) wrote wrong timestamps on imported segments,
and these wrong positions persist and propagate through compaction. L0
compaction then misses L1/L2 segments due to StartPosition mismatches,
causing zombie L0 segments and silent delete loss.
There is also a latent bug: DmlPosition in mix/clustering compaction
uses getMinPosition, but DmlPosition represents the latest entity
timestamp and should use max.
See also: #46435
pr: #48907
---------
Signed-off-by: yangxuan <xuan.yang@zilliz.com>
* Catalog.RestoreRBAC routed IsAnyWord through the
IsPrivilegeNameDefined /else branches and ended up calling
PrivilegeGroupNameForMetastore(""), writing
'grantee-id//PrivilegeGroup'.
* MetaTable.CheckIfRBACRestorable rejected wildcard grants with
'privilege [*] does not exist' before broadcastRestoreRBACV2 ever
reached the catalog, so the catalog fix alone was unreachable on the
in-process restore path.
issue: #48963
pr: #48978
Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
## Summary
- Port fix from master (#46088, #46348) to 2.5 branch
- When dynamically increasing `replicaNum` (e.g. 1→3 via `load()`
without release), the old implementation required `readyLeaders >=
replicaNum` per channel, causing a permanent deadlock because new
replicas had no nodes yet
- Switches to per-replica channel readiness check: only requires each
channel to have at least one ready leader across all replicas
issue: https://github.com/milvus-io/milvus/issues/48778,
https://github.com/milvus-io/milvus/issues/46087
pr: https://github.com/milvus-io/milvus/pull/46088
## Test plan
- [x] Unit tests for `shouldUpdateCurrentTarget` (88.4% function
coverage)
- Empty next target → false
- All channels ready → true
- Partial channels ready → false
- No ready delegators → false
- **Replica scaling with empty new replicas** (deadlock fix scenario) →
true
- Multiple channels across multiple replicas → true
- Sync failure / ListIndexes failure error paths
- [x] E2E test `TestReplicaScaling1To3`: load(replica=1) →
load(replica=3) without release → search OK
- [x] Verified on v2.5.27 Docker: deadlock reproduced without fix,
resolved with fix
- [x] Verified on v2.6.14 Docker (3SN+3QN): no deadlock (architecture
change avoids the issue)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
StringIndexMarisa (Trie index) was missing SupportPatternMatch() and
PatternMatch() overrides, causing the expression evaluation framework to
bypass the trie's efficient predictive_search-based PrefixMatch and fall
back to O(n) brute-force scan via Reverse_Lookup for every row.
This regression was introduced when the expression framework was
refactored to use UnaryIndexFunc/UnaryIndexFuncForMatch instead of the
old StringIndex::Query(dataset) path. Other index types
(StringIndexSort, InvertedIndexTantivy, BitmapIndex) were updated to
implement these interfaces, but StringIndexMarisa was missed.
Cherry-pick of #48688 to 2.5 branch.
issue: https://github.com/milvus-io/milvus/issues/48685
pr: #48688
---------
Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
## Summary
- Cherry-pick of #45722 to `2.5` branch
- Fix nil pointer dereference in `MultiTargetBalancer.genSegmentPlan()`
that causes MixCoord crash when using `MultipleTargetBalancer`
pr: https://github.com/milvus-io/milvus/pull/45722
issue: https://github.com/milvus-io/milvus/issues/48054,
https://github.com/milvus-io/milvus/issues/45598
## Root Cause
`genPlanByDistributions()` returns `SegmentAssignPlan` without setting
the `Replica` field. When `PrintNewBalancePlans()` logs these plans,
`SegmentAssignPlan.String()` dereferences the nil `Replica` pointer,
causing SIGSEGV.
## Fix
Set `Replica` field for all plans returned by `genPlanByDistributions()`
before returning from `genSegmentPlan()`.
---------
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
pr: #47541
- Upgrade Go version from 1.24.11 to 1.24.12 in Dockerfiles and go.mod
files
- Add apt-get upgrade -y to Dockerfiles for security updates
- Upgrade jose2go from v1.6.0 to v1.7.0
Signed-off-by: Li Liu <li.liu@zilliz.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This PR (cherry-pick from master cc18864):
1. Modifies the import mechanism to use actual timestamps from the
imported data for segment positions instead of using the channel
checkpoint.
2. Removes initial position setting in AllocImportSegment() - positions
are now set when import completes with actual timestamps.
3. Removes WithTimeRange(ts, ts) from import SyncTask since timestamps
will come from actual data.
issue: https://github.com/milvus-io/milvus/issues/47275
pr: https://github.com/milvus-io/milvus/pull/47276
---------
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
Related to #44058
This PR:
- Add common grpc metadata key for client request time
- Add gosdk & milvus inteceptor related logic for this attribute
- Bump go sdk version
pr: #44059
Signed-off-by: yangxuan <xuan.yang@zilliz.com>
Co-authored-by: congqixia <congqi.xia@zilliz.com>
In pulsar-client-go v0.12, `Consumer.Seek()` **includes** the message at
the seek position by default. However, in v0.17+, the default behavior
changed to **exclude** the seek position message.
This commit explicitly sets `StartMessageIDInclusive=true` when creating
pulsar consumers to ensure consistent seek behavior and prevent
potential message loss after upgrading the Pulsar client library.
issue: https://github.com/milvus-io/milvus/issues/46589
pr: https://github.com/milvus-io/milvus/pull/46501
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Cherry-pick from master
pr: #45975
Related to #45976
Bump golang.org/x/crypto to v0.45.0 fixing CVE-2025-47914
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Cherry-pick from master
pr: #45969
Related to #45960
Follow-up to #45961
After #45961 ensured that handleNodeUp is always called for nodes
discovered during rewatchNodes (including stopping nodes), this change
adds a safeguard in ResourceManager.handleNodeUp to skip adding stopping
nodes to resource groups.
1. **resource_manager.go**: Add check for IsStoppingState() in
handleNodeUp to prevent stopping nodes from being added to incomingNode
set and assigned to resource groups.
2. **server.go**:
- Delete processed nodes from sessionMap to avoid duplicate processing
in the subsequent loop
- Add warning logs for stopping state transitions during rewatch
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Cherry-pick from master
pr: #45147
Related to #44509
Fix a bug where QueryNodeNumEntities metrics were not updated for
collections with zero segments, causing stale metrics when all segments
are flushed or compacted.
The previous implementation used separate loops: one to update size
metrics for all collections, and another to update num entities metrics
only for collections present in the grouped segments map. Collections
with no segments were skipped in the second loop, leaving their
NumEntities metrics stale.
Changes:
- Consolidate size and num entities metric updates into single loop
- Iterate over all collections instead of grouped segments
- Get collection metadata from manager instead of segment instances
- Correctly set NumEntities to 0 for collections with no segments
- Apply the same fix to both growing and sealed segment processing
- Add nil check for collection metadata before processing
This ensures all collection metrics are updated consistently, even when
segment count drops to zero.
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Cherry-pick from master
pr: #45961
Related to #45960
When QueryCoord restarts or reconnects to etcd, the rewatchNodes
function previously skipped handleNodeUp for QueryNodes in stopping
state. This caused stopping balance to fail because necessary components
were not initialized:
- Task scheduler executor was not added
- Dist handler was not started
- Node was not registered in resource manager
This fix ensures handleNodeUp is always called for new nodes regardless
of their stopping state, followed by handleNodeStopping if the node is
stopping. This allows the graceful shutdown process to correctly migrate
segments and channels away from stopping nodes.
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
1. Array.h: Add output_data(ScalarFieldProto&) overload for both Array
and ArrayView classes
2. Use std::string_view instead of std::string for VARCHAR and GEOMETRY
types to avoid extra string copies
3. Call Reserve(length_) before writing to proto objects to reduce
memory reallocations
a simple test shows those optimizations improve the Array of Varchar
bulk_subscript performance by 20%
issue: https://github.com/milvus-io/milvus/issues/45679
pr: https://github.com/milvus-io/milvus/pull/45743
Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>