Commit Graph

183 Commits (hotfix-2.4.21)

Author SHA1 Message Date
sthuang e56399720d
fix: [2.4] rbac custom group privilege level check (#39194)
cherry-pick from master: https://github.com/milvus-io/milvus/pull/39164
related: related: https://github.com/milvus-io/milvus/issues/39086

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-01-13 13:58:58 +08:00
sthuang af2264446f
fix: [2.4] restore rbac with empty meta panic (#39142)
cp from master
pr: #39141
related: https://github.com/milvus-io/milvus/issues/38985

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2025-01-13 10:24:59 +08:00
Zhen Ye 782cd749bb
enhance: make new go package to manage proto (#39129)
issue: #39095
pr: #39114

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-01-10 10:13:01 +08:00
aoiasd b3410f52d9
enhance:[Cherry-pick] report restful and grpc auth info to hook (#38892)
pr: https://github.com/milvus-io/milvus/pull/38112
https://github.com/milvus-io/milvus/pull/38943

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-01-06 15:10:57 +08:00
sthuang ef6aae86cf
fix: [2.4] fix privilege group list and list collections (#38698)
cherry-pick from: https://github.com/milvus-io/milvus/pull/38684
related: https://github.com/milvus-io/milvus/issues/37031

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-12-25 14:32:51 +08:00
wei liu d975139c01
fix: Fix update loading collection's load config doesn't work (#38596)
issue: #38594
pr: #38595

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-12-25 11:30:51 +08:00
XuanYang-cn 21d76ad1ce
enhance: Use partitionID when delete by partitionKey (#38232)
When delete by partition_key, Milvus will generates L0 segments
globally. During L0 Compaction, those L0 segments will touch all
partitions collection wise. Due to the false-positive rate of segment
bloomfilters, L0 compactions will append false deltalogs to completed
irrelevant partitions, which causes *partition deletion amplification.

This PR uses partition_key to set targeted partitionID when producing
deleteMsgs into MsgStreams. This'll narrow down L0 segments scope to
partition level, and remove the false-positive influence
collection-wise.

However, due to DeleteMsg structure, we can only label one partition to
one deleteMsg, so this enhancement fails if user wants to delete over 2
partition_keys in one deletion.

pr: #38231 
See also: #34665

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-12-23 13:52:51 +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
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
sthuang d8f1af68e9
enhance: [2.4] RBAC built in privilege groups and grant v2 (#37787)
cherry-pick from master: https://github.com/milvus-io/milvus/pull/37720,
https://github.com/milvus-io/milvus/pull/37785
issue: https://github.com/milvus-io/milvus/issues/37031

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-11-25 11:24:54 +08:00
wei liu 1bd502b585
fix: Delegator stuck at unserviceable status (#37694) (#37702)
issue: #37679
pr: #37694

pr #36549 introduce the logic error which update current target when
only parts of channel is ready.

This PR fix the logic error and let dist handler keep pull distribution
on querynode until all delegator becomes serviceable.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-11-15 14:52:30 +08:00
wei liu 7d1c899155
fix: Search may return less result after qn recover (#36549) (#37610)
issue: #36293 #36242
pr: #36549
after qn recover, delegator may be loaded in new node, after all segment
has been loaded, delegator becomes serviceable. but delegator's target
version hasn't been synced, and if search/query comes, delegator will
use wrong target version to filter out a empty segment list, which
caused empty search result.

This pr will block delegator's serviceable status until target version
is synced

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-11-12 19:16:30 +08:00
sthuang 9e8b6ace6d
enhance: [2.4] RBAC custom privilege group (#37560)
Cherry-pick from master
pr: https://github.com/milvus-io/milvus/pull/37087,
https://github.com/milvus-io/milvus/pull/37558
issue: #37031

---------

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-11-11 14:20:29 +08:00
wei liu 349924615b
fix: [skip e2e]unstable integration test TestNodeDownOnSingleReplica(#37480) (#37499)
issue: #37289
pr: #37480

cause pr #37116 introduce retry on get shard leader, which make search
won't fail during query node down.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-11-07 16:48:26 +08:00
XuanYang-cn 20534a3f7b
fix: [cp24]Saperate L0 and Mix trigger interval (#37319)
See also: #37108
pr: #37190

- Add MixCompactionTriggerInterval, default 60s
- Add L0CompactionTriggerInterval, default 10s
- Export Single related compaction configs
- Raise SingleCompactionDeltaLogMaxSize from 2MB to 16MB

---------

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-11-06 11:10:26 +08:00
wei liu 3c09d42bfc
fix: [skip e2e] TestNodeDownOnSingleReplica has unstable result (#37288) (#37350)
issue: #37289
pr: #37288
those test case use search to verify replica's status, but if the search
gap is 1s, the node down's effect may be fixed up by balance.

This PR remove the 1 second gap between search operation.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-11-01 13:48:22 +08:00
yihao.dai da897e41f4
fix: Fix collection leak in querynode (#37061) (#37079)
Unref the removed L0 segment count.

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

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

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-10-25 18:19:39 +08:00
jaime da2d3fb430
enhance: enable manual compaction for collections without indexes (#36581)
issue: #36576
pr: #36577

Signed-off-by: jaime <yun.zhang@zilliz.com>
2024-10-08 14:51:20 +08:00
Zhen Ye e34fa0461b
fix: port listen racing in mix or standalone mode (#36459)
issue: #36441
pr: #36442

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-09-26 21:01:15 +08:00
wei liu 975a9797a2
enhance: Enable dynamic update loaded collection's replica (#36417)
issue: #35821
pr: #35822
After collection loaded, if we need to increase/decrease collection's
replica, we need to release and load it again.

milvus offers 4 solution to update loaded collection's replica, this PR
aims to dynamic change the replica number without release, and after
replica number changed, milvus will execute load replica or release
replica in async, and the replica loaded status can be checked by
getReplicas API.

Notice that if set too much replicas than querynode can afford,the new
replica won't be loaded successfully until enough querynode joins.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-09-26 10:43:15 +08:00
congqixia 210adbaffc
fix: [2.4] Wait check node id goroutine in case of data race (#36302) (#36377)
Cherry-pick from master
pr: #36302
Resolves: #36301

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-09-20 13:03:12 +08:00
Buqian Zheng 089790a459
enhance: [2.4]Allow empty sparse row (#36061)
pr: #34700

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2024-09-12 10:13:09 +08:00
wei liu ceca666e2a
fix: Fix privilege group hasn't been register for validate (#35938)
issue: #35471
pr: #35937

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-09-05 18:09:11 +08:00
yihao.dai b578064869
fix: Fix DB limiter nodes are mistakenly cleaned up (#35991) (#35992)
This issue only occurs for a short time right after a table is created.
To avoid this, we simply reduce the frequency of cleaning up invalid
limiter nodes.

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

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-09-05 17:31:05 +08:00
jaime a044a590cc
enhance: add IT for rate limit using db properties (#35931)
issue: #35929
pr: #35930

Signed-off-by: jaime <yun.zhang@zilliz.com>
2024-09-04 14:35:05 +08:00
wei liu da026b1e28
enhance: Add depguard rules to ban deprecated proto lib (#35140) (#35818)
See also #34394 #34252
pr: #35140

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
Co-authored-by: congqixia <congqi.xia@zilliz.com>
2024-08-30 14:13:01 +08:00
XuanYang-cn ff68eb53d7
fix: [skip e2e]unstable l0 it (#35613)
See also: #35617 
pr: #35612

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-08-26 18:53:04 +08:00
wei liu 421a00bfe8
enhance: Refresh proxy cache after restore rbac meta (#35636)
issue: #35443
pr: #35635

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-08-22 19:09:01 +08:00
wei liu e2542a1bf5
enhance: Update protobuf-go to protobuf-go v2 (#34394) (#35555)
issue: #34252
pr: #34394 #35072 #35084

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
Co-authored-by: Congqi Xia <congqi.xia@zilliz.com>
2024-08-21 18:50:58 +08:00
wei liu 4bf4cbad85
enhance: Mark query node as read only after suspend (#35492) (#35586)
issue: #34985 #35493
pr: #35492
after querynode has been suspended, it's not allow to load
segment/channel on it, which means the node is read only. to be
compatible with resource group design, after query node has been
suspend, we remove it from it's original resource group, make it a read
only query node in replica. then two things will happens:
1. it's original resource group will be lacking of query nodes, query
coord will assign new node to it.
2. querycoord will try to move out all segments/channels after querynode
has been suspended

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-08-20 19:00:56 +08:00
Chun Han cf8494ef45
enhance: support httpv1/v2 throttle and add it for httpV2(#35350) (#35504)
related: #35350
pr: https://github.com/milvus-io/milvus/pull/35470

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2024-08-20 16:32:56 +08:00
XuanYang-cn 4a5e6bc6f6
enhance: Add integration tests for l0 (#35430)
pr: #35429
See also: #34796

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-08-19 10:54:55 +08:00
wei liu 248a6ea401
enhance: Add BackupRBAC/RestoreRBAC API to enable rbac backup (#35444) (#35513)
issue: #35443
pr: #35444

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-08-18 13:42:55 +08:00
smellthemoon 23052f6ac2
fix: upsert use the previous pk in insert when autoid(#34672) (#35130)
issue: #34668 
pr: #34672

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
2024-08-12 18:58:25 +08:00
wei liu 0201e00a2f
enhance: enable to set load config in cluster level (#35293)
issue: #35170
pr: #35169
This PR enable to set load configs in cluster level, such as replicas
and resource groups. then when load collections will use the load
config.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-08-07 12:38:21 +08:00
wei liu 2ac1bf7532
enhance: Enable setting the replica number and resource group during collection creation (#34403) (#34561)
issue: #30040
pr: #34403

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-08-06 15:06:17 +08:00
yellow-shine 3a997e8056
enhance: docker-compose first then try to use docker compose (#35227)
https://github.com/milvus-io/milvus/issues/35209
https://github.com/milvus-io/milvus/pull/35208

---------

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
2024-08-02 19:37:09 +08:00
cai.zhang c340f387cf
enhance: [cherry-pick] Change the fixed value to a ratio for clustering segment size (#35075)
issue: #34495 

master pr: #35076

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-07-31 10:32:00 +08:00
congqixia 079276c6ff
fix: [2.4] Unify hook singleton implementation in proxy (#34888)
Cherry-pick from master
pr: #34887
Related to #34885

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-07-26 18:07:53 +08:00
wayblink 1e5c71d550
fix: [cherry-pick] fix dropped segment still visible after dropped by L2 single compaction (#35006)
bug: #35003

Signed-off-by: wayblink <anyang.wang@zilliz.com>
2024-07-26 13:47:48 +08:00
cai.zhang 74adedf750
enhance: Optimized the GC logic to ensure that memory is released in time (#34950)
issue: #34703 

master pr: #34949

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-07-24 14:07:43 +08:00
Chun Han ae1636c2be
fix: refine handling type for segment pruner(#34923) (#34926)
related: #34923
pr: https://github.com/milvus-io/milvus/pull/34925

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
2024-07-24 12:05:44 +08:00
wayblink 8f3c126129
enhance: [cherry-pick] support l2 single compaction (#34929)
#34928
pr: #34935

Signed-off-by: wayblink <anyang.wang@zilliz.com>
2024-07-24 11:47:50 +08:00
cai.zhang 4ed62e9dbb
enhance: [cherry-pick] Add integration test for clustering compaction (#34860)
issue: #34792 

master pr: #34881

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
2024-07-22 17:49:42 +08:00
wayblink 21973a600d
enhance: [cherry-pick] refine clustering compaction basic it (#34794)
issue: #34792
pr: #34793

Signed-off-by: wayblink <anyang.wang@zilliz.com>
2024-07-21 20:05:41 +08:00
yihao.dai 07bc1b6717
enhance: Seal by total growing segments size (#34692) (#34779)
Seals the largest growing segment if the total size of growing segments
of each shard exceeds the size threshold(default 4GB). Introducing this
policy can help keep the size of growing segments within a suitable
level, alleviating the pressure on the delegator.

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

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

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-07-19 18:25:50 +08:00
XuanYang-cn edefc3cbb5
enhance: [skip e2e]Enable compaction it test (#34526) (#34720)
pr: #34526

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
2024-07-16 18:19:38 +08:00
smellthemoon 0fdb288de7
enhance: upsert support autoid(#30342) (#34633)
pr: #30342 
issue: #29258

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
2024-07-15 20:53:39 +08:00
wei liu cf701a9bf0
enhance: Preserve fixed-size memory in delegator node for growing segment (#34600)
issue: #34595
pr: #34596
When consuming insert data on the delegator node, QueryCoord will move
out some sealed segments to manage its memory usage. After the growing
segment gets flushed, some sealed segments from other workers will be
moved back to the delegator node. To avoid the frequent movement of
segments, we estimate the maximum growing row count and preserve a
fixed-size memory in the delegator node.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-07-15 20:51:46 +08:00
wei liu d3e94f9861
enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl (#34377)
issue: #32995
pr: #33405
To speed up the construction and querying of Bloom filters, we chose a
blocked Bloom filter instead of a basic Bloom filter implementation.

WARN: This PR is compatible with old version bf impl, but if fall back
to old milvus version, it may causes bloom filter deserialize failed.

In single Bloom filter test cases with a capacity of 1,000,000 and a
false positive rate (FPR) of 0.001, the blocked Bloom filter is 5 times
faster than the basic Bloom filter in both querying and construction, at
the cost of a 30% increase in memory usage.

Block BF construct time {"time": "54.128131ms"}
Block BF size {"size": 3021578}
Block BF Test cost {"time": "55.407352ms"}
Basic BF construct time {"time": "210.262183ms"}
Basic BF size {"size": 2396308}
Basic BF Test cost {"time": "192.596229ms"}
In multi Bloom filter test cases with a capacity of 100,000, an FPR of
0.001, and 100 Bloom filters, we reuse the primary key locations for all
Bloom filters to avoid repeated hash computations. As a result, the
blocked Bloom filter is also 5 times faster than the basic Bloom filter
in querying.

Block BF TestLocation cost {"time": "529.97183ms"}
Basic BF TestLocation cost {"time": "3.197430181s"}

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-07-05 17:04:10 +08:00