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: Utilize coll2replica mapping when getting rg by collection #32892

Conversation

congqixia
Copy link
Contributor

See also #32165

In old GetResourceGroupByCollection implementation, it iterates all
replicas to match collection id, which is slow and CPU time consuming.
This PR make it utilize the coll2Replicas mapping by calling
GetByCollection and mapping replicas into resource group.

Signed-off-by: Congqi Xia congqi.xia@zilliz.com

See also milvus-io#32165

In old `GetResourceGroupByCollection` implementation, it iterates all
replicas to match collection id, which is slow and CPU time consuming.
This PR make it utilize the coll2Replicas mapping by calling
`GetByCollection` and mapping replicas into resource group.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
@sre-ci-robot sre-ci-robot added the size/S Denotes a PR that changes 10-29 lines. label May 9, 2024
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia

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

@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels May 9, 2024
Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.81%. Comparing base (8bb58d0) to head (1d01a1e).
Report is 5 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #32892      +/-   ##
==========================================
+ Coverage   81.80%   81.81%   +0.01%     
==========================================
  Files        1006     1006              
  Lines      126791   126787       -4     
==========================================
+ Hits       103720   103730      +10     
+ Misses      19138    19125      -13     
+ Partials     3933     3932       -1     
Files Coverage Δ
internal/querycoordv2/meta/replica_manager.go 81.44% <100.00%> (-0.33%) ⬇️

... and 27 files with indirect coverage changes

@mergify mergify bot added the ci-passed label May 9, 2024
@weiliu1031
Copy link
Contributor

/lgtm

@sre-ci-robot sre-ci-robot merged commit efa58ae into milvus-io:master May 9, 2024
15 checks passed
congqixia added a commit to congqixia/milvus that referenced this pull request May 10, 2024
…ilvus-io#32892)

See also milvus-io#32165

In old `GetResourceGroupByCollection` implementation, it iterates all
replicas to match collection id, which is slow and CPU time consuming.
This PR make it utilize the coll2Replicas mapping by calling
`GetByCollection` and mapping replicas into resource group.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
sre-ci-robot pushed a commit that referenced this pull request May 10, 2024
…tion (#32892) (#32922)

Cherry-pick from master
pr: #32892
See also #32165

In old `GetResourceGroupByCollection` implementation, it iterates all
replicas to match collection id, which is slow and CPU time consuming.
This PR make it utilize the coll2Replicas mapping by calling
`GetByCollection` and mapping replicas into resource group.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
UnyieldingOrca pushed a commit to UnyieldingOrca/milvus that referenced this pull request May 10, 2024
…ilvus-io#32892)

See also milvus-io#32165

In old `GetResourceGroupByCollection` implementation, it iterates all
replicas to match collection id, which is slow and CPU time consuming.
This PR make it utilize the coll2Replicas mapping by calling
`GetByCollection` and mapping replicas into resource group.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants