-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Reconnect with jitter. #2590
Reconnect with jitter. #2590
Conversation
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
This is built on top of #2477 which needs to be merged first. |
CLAs look good, thanks! |
This is now ready for review. |
@@ -125,6 +131,8 @@ struct grpc_subchannel { | |||
int have_alarm; | |||
/** our alarm */ | |||
grpc_alarm alarm; | |||
/** current random value */ | |||
gpr_int32 random; |
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.
random is used throughout the code as an unsigned, so can you change it to a uint?
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.
Done.
Besides my one comment, the code LGTM and I'll wait on the change of random and the appropriate level of green-ness. |
I am ready to merge this. |
According to https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md
Sample connect backoff: