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

bugfix add nil check for grpc connection pool objects in grpc/client.go #921

Merged

Conversation

kpango
Copy link
Collaborator

@kpango kpango commented Jan 13, 2021

Signed-off-by: kpango [email protected]

Description:

add nill checking for grpc connection pool object

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.15.2
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.1

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 - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

@codecov
Copy link

codecov bot commented Jan 13, 2021

Codecov Report

Merging #921 (8a99fc6) into master (96d70d2) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #921      +/-   ##
==========================================
- Coverage   16.23%   16.21%   -0.02%     
==========================================
  Files         473      473              
  Lines       23174    23219      +45     
==========================================
+ Hits         3763     3766       +3     
- Misses      19169    19211      +42     
  Partials      242      242              
Impacted Files Coverage Δ
internal/net/grpc/addrs.go 0.00% <0.00%> (ø)
internal/net/grpc/client.go 0.00% <0.00%> (ø)
internal/net/grpc/pool/pool.go 0.00% <0.00%> (ø)
pkg/gateway/lb/usecase/vald.go 0.00% <ø> (ø)
internal/errgroup/group.go 92.42% <0.00%> (-1.52%) ⬇️
internal/worker/worker.go 83.33% <0.00%> (+1.04%) ⬆️
internal/worker/queue.go 100.00% <0.00%> (+5.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 d6a0493...8a99fc6. Read the comment docs.

@@ -155,11 +156,15 @@ func (g *gRPCClient) StartConnectionMonitor(ctx context.Context) (<-chan error,
prTick := &time.Ticker{
C: make(chan time.Time),
}
if g.enablePoolRebalance {
reconnLimitDuration := time.Second
Copy link
Contributor

Choose a reason for hiding this comment

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

[golangci] reported by reviewdog 🐶
ineffectual assignment to reconnLimitDuration (ineffassign)

rinx
rinx previously approved these changes Jan 14, 2021
internal/net/grpc/client.go Outdated Show resolved Hide resolved
internal/net/grpc/client.go Outdated Show resolved Hide resolved
@kpango kpango force-pushed the bugfix/internal-net-grpc/add-nil-check-for-connection-pool branch from 67b1692 to 8a99fc6 Compare January 14, 2021 04:16
@kpango kpango merged commit a43f8f7 into master Jan 14, 2021
@kpango kpango deleted the bugfix/internal-net-grpc/add-nil-check-for-connection-pool branch January 14, 2021 04:36
@vdaas-ci vdaas-ci mentioned this pull request Jan 29, 2021
18 tasks
@kpango kpango mentioned this pull request Feb 2, 2021
11 tasks
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.

3 participants