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

grpclb: backoff for RPC call if init handshake was unsucessful #2077

Merged
merged 2 commits into from
Jun 14, 2018

Conversation

menghanl
Copy link
Contributor

No description provided.

@menghanl menghanl self-assigned this May 17, 2018
@dfawley dfawley changed the title grpclb: backoff for RPC call if init handshake was unsucessfully grpclb: backoff for RPC call if init handshake was unsucessful May 24, 2018
@dfawley dfawley assigned dfawley and unassigned menghanl May 24, 2018
@@ -176,13 +176,13 @@ func (lb *lbBalancer) sendLoadReport(s *balanceLoadClientStream, interval time.D
}
}

func (lb *lbBalancer) callRemoteBalancer() error {
func (lb *lbBalancer) callRemoteBalancer() (backoff bool, _ error) {
Copy link
Member

Choose a reason for hiding this comment

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

Another idea, to avoid the need for this boolean:

Remove lb.readServerList() from this function and call it where this function is called from. Then do:

if err := callRemoteBalancer(); err != nil {
  // Do not backoff
  continue
}
if err := lb.readServerList(); err != nil {
  // Backoff
  ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then the function still needs to return the stream as well.
Will keep the current code.

@dfawley dfawley assigned menghanl and unassigned dfawley May 31, 2018
@menghanl menghanl force-pushed the grpclb_backoff branch 2 times, most recently from bfbf29b to 88c6170 Compare June 12, 2018 19:38
@menghanl menghanl merged commit 692f13a into grpc:master Jun 14, 2018
@menghanl menghanl deleted the grpclb_backoff branch June 14, 2018 21:31
@menghanl menghanl added this to the 1.13 Release milestone Jun 14, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants