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

Open
wants to merge 1 commit into
base: 2.4
Choose a base branch
from

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.

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>
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: weiliu1031
To complete the pull request process, please assign congqixia after the PR has been reviewed.
You can assign the PR to them by writing /assign @congqixia in a comment when ready.

The full list of commands accepted by this bot can be found 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

@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 79.30233% with 89 lines in your changes missing coverage. Please review.

Project coverage is 71.90%. Comparing base (7ac3ef9) to head (327925d).

Files with missing lines Patch % Lines
internal/querycoordv2/job/job_update.go 54.79% 25 Missing and 8 partials ⚠️
internal/querycoordv2/server.go 72.09% 8 Missing and 4 partials ⚠️
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/meta/replica_manager.go 85.71% 2 Missing and 2 partials ⚠️
internal/rootcoord/alter_collection_task.go 88.88% 2 Missing and 1 partial ⚠️
internal/querycoordv2/meta/collection_manager.go 86.66% 1 Missing and 1 partial ⚠️
internal/util/mock/grpc_querycoord_client.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.4   #36417      +/-   ##
==========================================
+ Coverage   71.88%   71.90%   +0.02%     
==========================================
  Files        1060     1061       +1     
  Lines      139734   140086     +352     
==========================================
+ Hits       100452   100735     +283     
- Misses      34999    35044      +45     
- Partials     4283     4307      +24     
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/metastore/kv/querycoord/kv_catalog.go 76.37% <100.00%> (+0.26%) ⬆️
internal/querycoordv2/checkers/channel_checker.go 86.98% <100.00%> (+1.56%) ⬆️
internal/querycoordv2/checkers/segment_checker.go 89.73% <100.00%> (+0.07%) ⬆️
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%) ⬇️
... and 9 more

... and 33 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/internal-api area/test dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement 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.

2 participants