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

fix: Search/Query may failed during updating delegator cache #37174

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

weiliu1031
Copy link
Contributor

issue: #37115
pr: #37116
casue init query node client is too heavy, so we remove updateShardClient from leader mutex, which cause much more concurrent cornor cases.

This PR delay query node client's init operation until getClient is called, then use leader mutex to protect updating shard client progress to avoid concurrent issues.

casue init query node client is too heavy, so we remove
updateShardClient from leader mutex, which cause much more concurrent
cornor cases.

This PR delay query node client's init operation until `getClient` is
called, then use leader mutex to protect updating shard client progress
to avoid concurrent issues.

Signed-off-by: Wei Liu <[email protected]>
@sre-ci-robot sre-ci-robot added the size/M Denotes a PR that changes 30-99 lines. label Oct 28, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/bug Issues or changes related a bug labels Oct 28, 2024
@yanliang567 yanliang567 added this to the 2.4.14 milestone Oct 28, 2024
Signed-off-by: Wei Liu <[email protected]>
if err != nil {
return nil, err
return errors.Wrap(err, fmt.Sprintf("create client for node=%d failed", n.info.nodeID))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will the already created client be cleaned up before returning an error?

Signed-off-by: Wei Liu <[email protected]>
Copy link
Contributor

mergify bot commented Oct 28, 2024

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

@weiliu1031
Copy link
Contributor Author

/run-cpu-e2e

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 79.54545% with 9 lines in your changes missing coverage. Please review.

Project coverage is 80.54%. Comparing base (9d37ade) to head (c526299).
Report is 4 commits behind head on 2.4.

Files with missing lines Patch % Lines
internal/proxy/shard_client.go 70.00% 7 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.4   #37174      +/-   ##
==========================================
- Coverage   80.58%   80.54%   -0.05%     
==========================================
  Files        1066     1068       +2     
  Lines      165285   165638     +353     
==========================================
+ Hits       133197   133414     +217     
- Misses      27749    27859     +110     
- Partials     4339     4365      +26     
Files with missing lines Coverage Δ
internal/proxy/lb_policy.go 97.90% <100.00%> (+0.17%) ⬆️
internal/proxy/meta_cache.go 91.37% <100.00%> (ø)
internal/proxy/shard_client.go 83.12% <70.00%> (+4.64%) ⬆️

... and 41 files with indirect coverage changes

@mergify mergify bot added the ci-passed label Oct 28, 2024
@czs007
Copy link
Collaborator

czs007 commented Oct 28, 2024

/approve
/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: czs007, 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 79e6ef2 into milvus-io:2.4 Oct 28, 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 ci-passed dco-passed DCO check passed. kind/bug Issues or changes related a bug lgtm size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants