Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Enable dynamic update loaded collection's replica #36417

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

weiliu1031
Copy link
Contributor

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.

@sre-ci-robot sre-ci-robot added area/internal-api size/XXL Denotes a PR that changes 1000+ lines. area/test sig/testing test/integration integration test labels Sep 23, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Sep 23, 2024
Copy link
Contributor

mergify bot commented Sep 23, 2024

@weiliu1031 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@weiliu1031
Copy link
Contributor Author

rerun ut

@weiliu1031
Copy link
Contributor Author

/run-cpu-e2e

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 75.37797% with 114 lines in your changes missing coverage. Please review.

Project coverage is 84.96%. Comparing base (b92daa1) to head (6885b01).
Report is 5 commits behind head on 2.4.

Files with missing lines Patch % Lines
internal/querycoordv2/job/job_update.go 48.14% 32 Missing and 10 partials ⚠️
internal/querycoordv2/server.go 72.09% 8 Missing and 4 partials ⚠️
internal/metastore/kv/querycoord/kv_catalog.go 31.25% 10 Missing and 1 partial ⚠️
internal/querycoordv2/services.go 88.42% 8 Missing and 3 partials ⚠️
internal/querycoordv2/meta/resource_manager.go 0.00% 9 Missing ⚠️
internal/rootcoord/alter_database_task.go 73.33% 5 Missing and 3 partials ⚠️
internal/querycoordv2/job/job_load.go 72.22% 4 Missing and 1 partial ⚠️
internal/querycoordv2/task/executor.go 61.53% 4 Missing and 1 partial ⚠️
internal/querycoordv2/meta/replica_manager.go 86.20% 2 Missing and 2 partials ⚠️
internal/rootcoord/alter_collection_task.go 88.88% 2 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.4   #36417      +/-   ##
==========================================
+ Coverage   81.15%   84.96%   +3.80%     
==========================================
  Files        1060      794     -266     
  Lines      139759   115705   -24054     
==========================================
- Hits       113427    98306   -15121     
+ Misses      22061    13088    -8973     
- Partials     4271     4311      +40     
Files with missing lines Coverage Δ
internal/distributed/querycoord/client/client.go 97.53% <100.00%> (+0.06%) ⬆️
internal/distributed/querycoord/service.go 77.92% <100.00%> (+0.19%) ⬆️
internal/metastore/catalog.go 100.00% <ø> (ø)
internal/querycoordv2/checkers/channel_checker.go 85.61% <100.00%> (+0.19%) ⬆️
internal/querycoordv2/checkers/segment_checker.go 89.73% <100.00%> (-0.31%) ⬇️
internal/querycoordv2/utils/meta.go 73.10% <100.00%> (+10.28%) ⬆️
pkg/config/etcd_source.go 85.71% <100.00%> (ø)
tests/integration/minicluster_v2.go 74.07% <100.00%> (+0.26%) ⬆️
internal/querycoordv2/meta/collection_manager.go 88.52% <86.66%> (-0.08%) ⬇️
internal/util/mock/grpc_querycoord_client.go 94.73% <0.00%> (-2.57%) ⬇️
... and 10 more

... and 297 files with indirect coverage changes

@mergify mergify bot added ci-passed and removed ci-passed labels Sep 23, 2024
Copy link
Contributor

mergify bot commented Sep 23, 2024

@weiliu1031 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@weiliu1031 weiliu1031 force-pushed the enable_dynamic_load_replica24 branch from 7add7a3 to da4607f Compare September 24, 2024 02:10
Copy link
Contributor

mergify bot commented Sep 24, 2024

@weiliu1031 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify mergify bot added the ci-passed label Sep 24, 2024
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>
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
@weiliu1031 weiliu1031 force-pushed the enable_dynamic_load_replica24 branch from da4607f to 6885b01 Compare September 24, 2024 10:34
@mergify mergify bot added ci-passed and removed ci-passed labels Sep 24, 2024
@congqixia congqixia added this to the 2.4.13 milestone Sep 25, 2024
Copy link
Contributor

@congqixia congqixia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia, weiliu1031

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot merged commit 975a979 into milvus-io:2.4 Sep 26, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/internal-api area/test ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm sig/testing size/XXL Denotes a PR that changes 1000+ lines. test/integration integration test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants