-
Notifications
You must be signed in to change notification settings - Fork 726
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
*: make max backoff shorter #7823
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
@@ -62,7 +63,15 @@ func GetClientConn(ctx context.Context, addr string, tlsCfg *tls.Config, do ...g | |||
if err != nil { | |||
return nil, errs.ErrURLParse.Wrap(err).GenWithStackByCause() | |||
} | |||
cc, err := grpc.DialContext(ctx, u.Host, append(do, opt)...) | |||
backoffOpts := grpc.WithConnectParams(grpc.ConnectParams{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use this config? Do we need to add some comments here?
bcedbda
to
2d56f9a
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7823 +/- ##
==========================================
- Coverage 73.52% 73.41% -0.12%
==========================================
Files 432 432
Lines 47937 47953 +16
==========================================
- Hits 35248 35204 -44
- Misses 9650 9696 +46
- Partials 3039 3053 +14
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: Ryan Leung <[email protected]>
2d56f9a
to
99a232e
Compare
pkg/utils/grpcutil/grpcutil.go
Outdated
cc, err := grpc.DialContext(ctx, u.Host, append(do, opt)...) | ||
backoffOpts := grpc.WithConnectParams(grpc.ConnectParams{ | ||
Backoff: backoff.Config{ | ||
BaseDelay: 100 * time.Millisecond, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the BaseDelay is 1s in
Line 117 in e199866
grpc.WithConnectParams(grpc.ConnectParams{ |
Do we need keep them same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Signed-off-by: Ryan Leung <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. and need some comments as @lhy1024 says.
Signed-off-by: Ryan Leung <[email protected]>
/merge |
@rleungx: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 22638b5
|
BaseDelay: time.Second, | ||
Multiplier: 1.6, | ||
Jitter: 0.2, | ||
MaxDelay: 3 * time.Second, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making MaxDelay configurable through some WithXX function to meet different callers‘s requests?
What problem does this PR solve?
Issue Number: Close #7821.
What is changed and how does it work?
This PR changes the gRPC connection backoff config to reduce the recovery time.
Check List
Tests
Release note