20696 Commits

Author SHA1 Message Date
wei liu
83e162f5f1
enhance: Enable score based balance channel policy (#38143) (#38378)
issue: #38142
pr: #38143
current balance channel policy only consider current collection's
distribution, so if all collections has 1 channel, and all channels has
been loaded on same querynode, after querynode num increase, balance
channel won't be triggered.

This PR enable score based balance channel policy, to achieve:
1. distribute all channels evenly across multiple querynodes
2. distribute each collection's channel evenly across multiple
querynodes.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-12-13 10:28:44 +08:00
SimFG
df73f93126
enhance: [2.4] pick some master improvements to 2.4 branch (#38128)
- issue: #38127

master pr list:
- #37759
- #37835
- #37845
- #37874
- #37894
- #37969
- #37983
- #38005
- #38035

---------

Signed-off-by: SimFG <bang.fu@zilliz.com>
2024-12-13 10:24:45 +08:00
cai.zhang
85ade98eba
fix: [2.4]Fix sorting buffer in clustering compaction (#38418)
issue: #28410 

master pr: #38417

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-12-13 10:12:49 +08:00
Xianhui Lin
24c8883369
enhance: [2.4]altercollection validation logic (#38421)
altercollection validation logic
issue: https://github.com/milvus-io/milvus/issues/37436
pr: https://github.com/milvus-io/milvus/pull/38419

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2024-12-12 21:46:44 +08:00
sthuang
19818c55b2
enhance: [2.4] add privilege group privilege into built-in privilege group (#38408)
cherry-pick from master: https://github.com/milvus-io/milvus/pull/38393
related issue: https://github.com/milvus-io/milvus/issues/37031

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-12-12 19:56:43 +08:00
congqixia
cacac66c93
fix: [2.4] Check target partition load state only when dropping partition (#38375) (#38394)
Cherry pick from master
pr: #38375
Related to #38372

This PR make drop partition only check target partition load states only
in case of concurrent releasing other partition in same collection.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-12-12 17:18:43 +08:00
Ted Xu
e959860451
enhance: remove unnecessary clone in meta cache (#36628) (#38392)
See #36627

---------

pr: #36628

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
2024-12-12 11:28:43 +08:00
nico
2e5537f050
test: update sdk version and cases (#38363)
pr: #38330

Signed-off-by: nico <cheng.yuan@zilliz.com>
2024-12-12 10:40:42 +08:00
Gao
d7e926f1cb
enhance: [2.4] support recall estimation (#38064)
issue: #37899 
pr: #38017

---------

Signed-off-by: chasingegg <chao.gao@zilliz.com>
2024-12-11 20:40:48 +08:00
wei liu
9b1a7287d1
enhance: Optimize save collection target latency (#38345) (#38370)
issue: #38237
pr: #38345
this PR only use better compression level for proto msg which is larger
than 1MB, and use a lighter compression level for smaller proto msg,
which could get a better latency in most case.

this PR could reduce the latency from 22.7s to 4.7s with 10000
collctions and each collections has 1000 segments.

before this PR:
BenchmarkTargetManager-8 1 22781536357 ns/op 566407275088 B/op 11188282
allocs/op
after this PR:
BenchmarkTargetManager-8 1 4729566944 ns/op 36713248864 B/op 10963615
allocs/op

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-12-11 19:24:44 +08:00
cai.zhang
dde9d6c54f
fix:[2.4]Set the correct compactionFroms for clustering segments (#38376)
issue: #38373 
master pr: #36799 
This bug was introduced by PR #37653 .

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-12-11 19:02:43 +08:00
wei liu
b2a8b9c605
fix: Fix role be dropped when grant still exist. (#38342) (#38369)
issue: #38325
pr: #38342
the old impl only to check grant in default db before drop role, which
may cause role be dropped when grant still exist.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-12-11 17:26:43 +08:00
yihao.dai
9765db2465
fix: [2.4] Fix empty import task result (#38317)
Ensure the idempotency of import tasks to prevent duplicate tasks in
DataNode.

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

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-12-11 15:42:49 +08:00
jaime
7cee01af44
fix: stream connection leak in case of error (#38321)
issue: #38318
pr: #38320

Signed-off-by: jaime <yun.zhang@zilliz.com>
2024-12-11 15:38:49 +08:00
cai.zhang
e758d8e4e8
fix: [2.4] Set the start time for index tasks that no need actual building (#38353)
issue: #38354

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-12-11 15:36:44 +08:00
cai.zhang
e843a464e1
enhance: [2.4]Skip create index for l0 segment (#38335)
master pr: #38334

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-12-11 15:02:44 +08:00
Xianhui Lin
d8753a1489
enhance: [2.4]alterindex & altercollection supports altering properties (#38361)
enhance :

alterindex delete properties
We have introduced a new parameter deleteKeys to the alterindex
functionality, which allows for the deletion of properties within an
index. This enhancement provides users with the flexibility to manage
index properties more effectively by removing specific keys as needed.
altercollection delete properties
We have introduced a new parameter deleteKeys to the altercollection
functionality, which allows for the deletion of properties within an
collection. This enhancement provides users with the flexibility to
manage collection properties more effectively by removing specific keys
as needed.
3.support altercollectionfield
We currently support modifying the fieldparams of a field in a
collection using altercollectionfield, which only allows changes to the
max-length attribute.
Key Points:

New Parameter - deleteKeys: This new parameter enables the deletion of
specified properties from an index. By passing a list of keys to
deleteKeys, users can remove the corresponding properties from the
index.

Mutual Exclusivity: The deleteKeys parameter cannot be used in
conjunction with the extraParams parameter. Users must choose one
parameter to pass based on their requirement. If deleteKeys is provided,
it indicates an intent to delete properties; if extraParams is provided,
it signifies the addition or update of properties.

issue: https://github.com/milvus-io/milvus/issues/37436
pr: https://github.com/milvus-io/milvus/pull/37437

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2024-12-11 11:46:43 +08:00
jaime
ee403442f6
fix: [skip e2e] unstable ut in services_test.go (#38356)
issue: #35563

Signed-off-by: jaime <yun.zhang@zilliz.com>
2024-12-11 11:22:44 +08:00
SimFG
fc4a0b1463
enhance: [2.4] keep the latest snapshot key if the origin key is existed (#38351)
/kind improvement
- pr: #38333

Signed-off-by: SimFG <bang.fu@zilliz.com>
2024-12-11 10:24:50 +08:00
wei liu
f4696a1993
fix: Leader task stuck and retry again and again (#38202) (#38349)
issue: #38201
pr: #38202
leader task require to update delegator's distribution, and only success
after the distribution change has been applyed to delegator. but the
delegator will reject the distribution change if it's version is older
than current version in delegator. which cause the leader task stuck and
retry forever.

this PR remove the leader task finish check.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-12-11 10:10:43 +08:00
Buqian Zheng
25249fd26e
enhance: [2.4] add metrics for counting number of nun-zeros/tokens of sparse search (#38328)
sparse vectors may have arbitrary number of non zeros and it is hard to
optimize without knowing the actual distribution of nnz. this PR adds a
metric for analyzing that.

pr: #38329 

also fixed a bug of sparse when searching by pk

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2024-12-11 10:00:43 +08:00
Zhen Ye
6b310e16dc
enhance: remove the rpc layer of coordinator when enabling standalone or mixcoord (#38207)
issue: #37764
pr: #37815 
also see: #38259

- add a local client to call local server directly for
querycoord/rootcoord/datacoord.
- enable local client if milvus is running mixcoord or standalone mode.
- after removing rpc layer from mixcoord, the querycoord at standby mode
will be blocked forever of deployment rolling

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-12-10 20:38:44 +08:00
wei liu
c4b646005c
enhance: Remove constraint on release segment task (#38306)
issue: #38305 
pr: #38297
after we disable balance segment and balance channel happens at same
time, the constriant which require release segment must happens on
serviceable shard leader is unnecessary.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-12-10 11:18:49 +08:00
nico
dcd6004e1d
enhance: update pymilvus version(2.4) (#38227)
pr: #38225

Signed-off-by: nico <cheng.yuan@zilliz.com>
2024-12-09 19:52:47 +08:00
wei liu
0c442b6fd6
fix: Datanode stop progress stuck at writer buffer memory check (#38274) (#38287)
issue: #38273
pr: #38274 #38278

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-12-09 17:36:42 +08:00
yihao.dai
bd1ffeaf92
fix: [2.4] Fix init rootcoord meta timeout (#38249) (#38253)
issue: https://github.com/milvus-io/milvus/issues/37630

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-12-08 18:12:47 +08:00
cai.zhang
ddc40a7266
enhance: [2.4]Determine the number of buffers based on the resource limits of the DataNode (#38210)
issue: #28410 

master pr: #38209

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-12-08 17:54:41 +08:00
zhuwenxing
d2c20ed68b
test: add restful testcases for database api (#38282)
pr: https://github.com/milvus-io/milvus/pull/38281

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2024-12-07 14:42:45 +08:00
foxspy
4e5828139b
enhance: [2.4] update knowhere version (#38277)
/kind branch-feature
release note :
https://github.com/zilliztech/knowhere/releases/tag/v2.3.14

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
2024-12-06 21:40:42 +08:00
congqixia
9eb08e1f7b
fix: [2.4] querycoord collection num metric (#36471)(#38233) (#38240)
Cherry pick from master
pr: #36471 #38233

related to: #36456

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Co-authored-by: sthuang <167743503+shaoting-huang@users.noreply.github.com>
2024-12-06 16:38:42 +08:00
yihao.dai
12cc500009
enhance: [2.4] Reduce segmentManager lock granularity (#37869)
Use a channel level key lock for segments in segmentManager.

issue: https://github.com/milvus-io/milvus/issues/37633,
https://github.com/milvus-io/milvus/issues/37630

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-12-06 16:34:41 +08:00
smellthemoon
8126dc53ae
enhance: use require dbname for some db req(#38267) (#38268)
pr: #38267

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
2024-12-06 16:26:46 +08:00
Xianhui Lin
a51647569b
enhance: [2.4]alterindex & altercollection supports altering properties (#38111)
enhance :

alterindex delete properties
We have introduced a new parameter deleteKeys to the alterindex
functionality, which allows for the deletion of properties within an
index. This enhancement provides users with the flexibility to manage
index properties more effectively by removing specific keys as needed.
altercollection delete properties
We have introduced a new parameter deleteKeys to the altercollection
functionality, which allows for the deletion of properties within an
collection. This enhancement provides users with the flexibility to
manage collection properties more effectively by removing specific keys
as needed.
3.support altercollectionfield
We currently support modifying the fieldparams of a field in a
collection using altercollectionfield, which only allows changes to the
max-length attribute.
Key Points:

New Parameter - deleteKeys: This new parameter enables the deletion of
specified properties from an index. By passing a list of keys to
deleteKeys, users can remove the corresponding properties from the
index.

Mutual Exclusivity: The deleteKeys parameter cannot be used in
conjunction with the extraParams parameter. Users must choose one
parameter to pass based on their requirement. If deleteKeys is provided,
it indicates an intent to delete properties; if extraParams is provided,
it signifies the addition or update of properties.

issue: https://github.com/milvus-io/milvus/issues/37436
pr: https://github.com/milvus-io/milvus/pull/37437

---------

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
2024-12-06 14:50:41 +08:00
jaime
51eb25438c
fix: nil pointer in health check request (#38266)
issue: #35563
pr: #35589

Signed-off-by: jaime <yun.zhang@zilliz.com>
2024-12-06 13:34:41 +08:00
yellow-shine
075b62e6e7
enhance: [2.4][ci] get log from loki instead of api-server (#38197)
https://github.com/milvus-io/milvus/pull/38158

---------

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
2024-12-06 09:56:40 +08:00
yihao.dai
1f8299f3b2
fix: [2.4] Fix checkGeneralCapacity slowly (#38074)
Cache the general count to speed up checkGeneralCapacity.

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

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-12-05 20:56:40 +08:00
wei liu
8646bba134
fix: grant ManualCompact api doesn't work (#38096) (#38168)
issue: #38086
pr: #38096
cause ManualCompact api pass collection id in request, but RBAC requires
to check collection name, so grant ManualCompact api doesn't work.

This PR refine the ManualCompact api to accpet collection name in
request.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-12-05 16:00:42 +08:00
zhuwenxing
d4ef89f1c6
test: relax the checks on range search (#36542) (#38234)
/kind improvement

pr:  #36542
2024-12-05 14:36:41 +08:00
smellthemoon
3d98e8e690
enhance: support templates for expression in Restful api(#38040) (#38161)
pr: #38040
issue: #36672

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
2024-12-05 14:26:42 +08:00
jaime
67a004ca20
fix: invalid rate limit for time tick delay (#38218)
issue: #38217

Signed-off-by: jaime <yun.zhang@zilliz.com>
2024-12-05 14:20:41 +08:00
congqixia
f888267d37
enhance: [2.4] Fill version for load delta request (#38212) (#38228)
Cherry-pick from master
pr: #38212
Version is needed for load delta request in case of false alarm warning
about version go backward

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-12-05 14:08:41 +08:00
tinswzy
bd08b3b2d3
enhance: Add mmap file usage metric (#38211)
issue: #38156 
cherry-pick from https://github.com/milvus-io/milvus/pull/38193

Signed-off-by: tinswzy <zhenyuan.wei@zilliz.com>
2024-12-04 20:24:40 +08:00
sthuang
febed0abb7
enhance: [2.4] add list aliases privilege into public role and fix typo (#38208)
cherry-pick from master: https://github.com/milvus-io/milvus/pull/38176,
https://github.com/milvus-io/milvus/pull/38195
related issue: https://github.com/milvus-io/milvus/issues/37031

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-12-04 17:58:40 +08:00
jaime
319f5494cd
enhance: optimize CPU usage for CheckHealth requests (#35595)
issue: #35563
pr: #35589

Signed-off-by: jaime <yun.zhang@zilliz.com>
2024-12-04 14:26:41 +08:00
cai.zhang
0fe4b2c7b7
enhance: Remove pre-marking segments as L2 during clustering compaction (#37653)
issue: #36686

master pr: #36799 

The core of this change is to **ensure that the many-to-many lineage
derivation logic is correct, making sure that both the parent and child
cannot simultaneously exist in the target segment view.**

feature:
  - Clustering compaction no longer marks the input segments as L2.
- Add a new field `is_invisible` to `segmentInfo`, and mark segments
that have completed clustering but have not yet built indexes as
`is_invisible` to prevent them from being loaded prematurely."
- Do not mark the input segment as `Dropped` before the clustering
compaction is completed.
- After compaction fails, only the result segment needs to be marked as
Dropped.

compatibility:
- If the upgraded task has not failed, there are no compatibility
issues.
- If the status after the upgrade is `MetaSaved`, then skip the stats
task based on whether TmpSegments is empty.
  - If the failure occurs before `MetaSaved`:
- there are no ResultSegments, and InputSegments have not been marked as
dropped yet.
    - the level of input segments need to revert to LastLevel
  - If the failure occurs after `MetaSaved`:
- ResultSegments have already been generated, and InputSegments have
been marked as Dropped. At this point, simply make the ResultSegments
visible.
- the level of ResultSegments needs to be set to L1(in order to
participate in mixCompaction)

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-12-04 10:48:40 +08:00
smellthemoon
ab88d23ec0
enhance: support db request in Restful api(#38140)(#38078) (#38188)
pr: #38078
pr: #38140
issue: #38077

---------

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
2024-12-04 10:40:39 +08:00
smellthemoon
7bd401c019
enhance: enable limiter for restful v1(#38160) (#38190)
pr: #38160

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
2024-12-04 10:18:38 +08:00
yihao.dai
7b82417641
fix: [2.4] Fix inaccurate partition num metric (#38073)
The partition number has already been incremented in
ChangePartitionState, so there is no need to increment it again in
AddPartition.

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

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-12-04 10:02:39 +08:00
sthuang
66f2dac5f5
fix: [2.4] fix grant/revoke v2 meta and unclear error messages (#38146)
cherry-pick from https://github.com/milvus-io/milvus/pull/38110,
https://github.com/milvus-io/milvus/pull/38130
related issue: https://github.com/milvus-io/milvus/issues/37031

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-12-03 22:06:41 +08:00
congqixia
03f01d8869
enhance: [2.4] Use fdopen, fwrite to reduce direct syscall (#38157) (#38180)
Cherry-pick from master
pr: #38157
`File.Write` and `File.WriteInt` use `write`, which may be just direct
syscall in some systems. When mappding field data and write line by
line, this could cost lost of CPU time when the row number is large.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-12-03 20:14:39 +08:00