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

Don't return an error from dial if the balancer returns no initial servers #1112

Merged
merged 2 commits into from
Mar 21, 2017

Conversation

dfawley
Copy link
Member

@dfawley dfawley commented Mar 8, 2017

This also modifies the WithBlock behavior somewhat to block until there is at least one
valid connection. Previously, each connection would be made serially until all
had completed successfully, with any errors returned to the caller. Errors are
now only returned due to connecting to a backend if a balancer is not used, or
if there is an error starting the balancer itself.

Fixes #976

…rvers

This modifies the WithBlock behavior somewhat to block until there is at least
one valid connection.  Previously, each connection would be made serially until
all had completed successfully, with any errors returned to the caller.  Errors
are now only returned due to connecting to a backend if a balancer is not used,
or if there is an error starting the balancer itself.

Fixes grpc#976
if ch != nil {
if cc.dopts.block {
doneChan := make(chan struct{})
go cc.lbWatcher(doneChan)
Copy link
Contributor

Choose a reason for hiding this comment

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

In blocking mode, we need a mechanism for lbwatcher to send an error back(if there's one) to DialContext so that the users can be intimated about it.
Also, we need to discuss which error should lbwatcher return since there could be multiple errors while connecting to multiple servers

@dfawley dfawley added 1.3 and removed 1.2 labels Mar 20, 2017
@dfawley dfawley merged commit c5a5dbc into grpc:master Mar 21, 2017
@dfawley dfawley deleted the balancer_empty branch March 21, 2017 18:36
@menghanl menghanl added Type: Behavior Change Behavior changes not categorized as bugs and removed Release Notes labels Apr 22, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Behavior Change Behavior changes not categorized as bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants