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

Move ETCD client into Session #27069

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Conversation

filip-halt
Copy link
Contributor

@filip-halt filip-halt commented Sep 13, 2023

This PR is part of a multi-part effort to remove kv dependencies from being hardcoded throughout files.

In this specific pr we are removing the requirement to pass in etcd and metarootpath into session. The ability is still there so functions in cmd, backup, and tests can still function.

#26694

@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Sep 13, 2023
@mergify mergify bot added the dco-passed DCO check passed. label Sep 13, 2023
@mergify
Copy link
Contributor

mergify bot commented Sep 13, 2023

@filip-halt Please associate the related issue to the body of your Pull Request. (eg. “issue: #”)

@mergify
Copy link
Contributor

mergify bot commented Sep 13, 2023

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

@mergify
Copy link
Contributor

mergify bot commented Sep 13, 2023

@filip-halt ut workflow job failed, comment rerun ut can trigger the job again.

@filip-halt
Copy link
Contributor Author

@yiwangdr

internal/util/dependency/kv/kv_client_handler.go Outdated Show resolved Hide resolved
internal/util/dependency/kv/kv_client_handler.go Outdated Show resolved Hide resolved
internal/util/dependency/kv/kv_client_handler.go Outdated Show resolved Hide resolved
Comment on lines 32 to 58
if reuser.Client == nil {
var err error
reuser.Client, err = NewETCDClient()
if err != nil {
panic(err)
}
reuser.Rootpath = GetETCDRootPath()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If we move client creation code into NewETCDReuser(), can we get rid of mu ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue that comes up here is that the configs don't necessarily exist yet or might need to be modified so we cant immediately try to create the client but we rather have to wait for the first call. Im debating having an etcdFactory created at datacoord creation and then pass that into the session_util. Once the rest of the factory changes are done we can swap the etcdFactory with the overarching dependency factory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The next step can remove the lock by bringing in the clients to the factory.

internal/util/dependency/kv/kv_client_handler.go Outdated Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented Sep 14, 2023

@filip-halt, please be sure the pr should only have one commit, check https://github.com/milvus-io/milvus/blob/master/CODE_REVIEW.md for more details.

@mergify
Copy link
Contributor

mergify bot commented Sep 18, 2023

@filip-halt, please be sure the pr should only have one commit, check https://github.com/milvus-io/milvus/blob/master/CODE_REVIEW.md for more details.

@mergify mergify bot added the needs-rebase label Sep 18, 2023
@mergify
Copy link
Contributor

mergify bot commented Sep 18, 2023

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

@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #27069 (c8d7108) into master (f9c6302) will increase coverage by 0.01%.
Report is 4 commits behind head on master.
The diff coverage is 91.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #27069      +/-   ##
==========================================
+ Coverage   81.77%   81.78%   +0.01%     
==========================================
  Files         821      821              
  Lines      116389   116435      +46     
==========================================
+ Hits        95175    95227      +52     
+ Misses      18057    18051       -6     
  Partials     3157     3157              
Files Coverage Δ
internal/datanode/data_node.go 76.54% <100.00%> (ø)
internal/distributed/datacoord/client/client.go 93.92% <100.00%> (ø)
internal/distributed/datanode/service.go 81.94% <100.00%> (ø)
internal/distributed/proxy/service.go 79.97% <100.00%> (-0.70%) ⬇️
internal/distributed/querycoord/client/client.go 93.38% <100.00%> (ø)
internal/distributed/querycoord/service.go 73.63% <100.00%> (ø)
internal/distributed/rootcoord/client/client.go 94.06% <100.00%> (ø)
internal/distributed/rootcoord/service.go 79.92% <100.00%> (ø)
internal/indexnode/indexnode.go 79.90% <100.00%> (ø)
internal/proxy/proxy.go 68.01% <100.00%> (ø)
... and 19 more

... and 13 files with indirect coverage changes

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: filip-halt, jiaoew1991, yiwangdr

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

@jiaoew1991
Copy link
Contributor

overall LGTM, need to fix the conflicts

@mergify
Copy link
Contributor

mergify bot commented Oct 25, 2023

@filip-halt ut workflow job failed, comment rerun ut can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Oct 25, 2023

@filip-halt, please be sure the pr should only have one commit, check https://github.com/milvus-io/milvus/blob/master/CODE_REVIEW.md for more details.

@mergify mergify bot added the needs-rebase label Oct 25, 2023
@mergify
Copy link
Contributor

mergify bot commented Oct 25, 2023

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

@filip-halt
Copy link
Contributor Author

/run-cpu-e2e

@mergify
Copy link
Contributor

mergify bot commented Oct 26, 2023

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

@filip-halt
Copy link
Contributor Author

rerun ut

Signed-off-by: Filip Haltmayer <[email protected]>
@jiaoew1991
Copy link
Contributor

/lgtm

@sre-ci-robot sre-ci-robot merged commit 6b1a106 into milvus-io:master Oct 26, 2023
12 checks passed
MrPresent-Han pushed a commit to MrPresent-Han/milvus that referenced this pull request Dec 6, 2023
sre-ci-robot pushed a commit that referenced this pull request Dec 7, 2023
relate: #26694
pr: #27069

Signed-off-by: Filip Haltmayer <[email protected]>
Signed-off-by: MrPresent-Han <[email protected]>
Co-authored-by: Filip Haltmayer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/test ci-passed dco-passed DCO check passed. lgtm sig/testing size/L Denotes a PR that changes 100-499 lines. test/integration integration test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants