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 to get only backoff metrics of discover RPC #1706

Merged
merged 9 commits into from
Jun 23, 2022
Merged

Conversation

hlts2
Copy link
Collaborator

@hlts2 hlts2 commented Jun 20, 2022

Description:

WHAT

I fixed code to get only backoff metrics of discover RPC.

WHY

There was a lot of backoff metrics in discover RPC before.
The current implementation included a backoff metrics that is not directly related to the RPC call.

https://github.com/vdaas/vald/blob/master/internal/client/v1/client/discoverer/discover.go#L221

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.18.3
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 1.14.6

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #1706 (d48cef7) into master (a7e6c5d) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1706      +/-   ##
==========================================
- Coverage   31.60%   31.53%   -0.08%     
==========================================
  Files         385      385              
  Lines       32691    32713      +22     
==========================================
- Hits        10331    10315      -16     
- Misses      21966    22001      +35     
- Partials      394      397       +3     
Impacted Files Coverage Δ
internal/client/v1/client/discoverer/discover.go 0.00% <0.00%> (ø)
internal/net/grpc/client.go 0.00% <0.00%> (ø)
...ent/core/ngt/service/vqueue/undeleted_index_map.go 68.33% <0.00%> (-2.78%) ⬇️
...nt/core/ngt/service/vqueue/uninserted_index_map.go 70.49% <0.00%> (-2.74%) ⬇️
internal/backoff/backoff.go 71.28% <0.00%> (-1.99%) ⬇️
internal/worker/worker.go 83.59% <0.00%> (-1.57%) ⬇️
internal/worker/queue.go 98.73% <0.00%> (-1.27%) ⬇️
internal/errgroup/group.go 94.00% <0.00%> (-1.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7e6c5d...d48cef7. Read the comment docs.

Signed-off-by: hlts2 <[email protected]>
@hlts2 hlts2 changed the title Refactor discover logic Fix to get only backoff metrics of discover RPC Jun 21, 2022
@hlts2 hlts2 self-assigned this Jun 21, 2022
@hlts2 hlts2 marked this pull request as ready for review June 21, 2022 01:13
@github-actions
Copy link
Contributor

@vdaas-ci
Copy link
Collaborator

Profile Report

typevald-agent-ngtvald-lb-gatewayvald-discoverervald-manager-index
cpu
heap
other images

@vankichi vankichi requested a review from datelier June 23, 2022 04:37
@hlts2
Copy link
Collaborator Author

hlts2 commented Jun 23, 2022

Thank you for your review! 🙏
I will merge this PR:+1:

@hlts2 hlts2 merged commit 13c0e71 into master Jun 23, 2022
@hlts2 hlts2 deleted the fix-discover-logic branch June 23, 2022 08:11
kevindiu pushed a commit that referenced this pull request Jul 4, 2022
* fix context propagation

Signed-off-by: hlts2 <[email protected]>

* fix discover logic

Signed-off-by: hlts2 <[email protected]>

* refactor

Signed-off-by: hlts2 <[email protected]>

* add method to get backoff instance

Signed-off-by: hlts2 <[email protected]>

* fix invalid memory access error and refactor disconnect logic

Signed-off-by: hlts2 <[email protected]>

* add backoff name to roundrobin context

Signed-off-by: hlts2 <[email protected]>

* Update internal/client/v1/client/discoverer/discover.go

Co-authored-by: Yusuke Kato <[email protected]>

* fix build error and reuse named return variable

Signed-off-by: hlts2 <[email protected]>

Co-authored-by: Yusuke Kato <[email protected]>
@kevindiu kevindiu mentioned this pull request Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants