Hi, I had a question about grpc-go's behavior when you use a custom balancer and there are no available backends available. My understanding is with FailFast callopt, the rpc should fail immediately rather then consuming the entire RPC deadline budget. However, that does not seem to be the case. I've modified the helloworld to use the manual balancer https://gist.github.com/aamitdb/7df4bc5c6b8c0bf3b667023f3b779ebf and despite FailFast, the program terminates with `2018/05/07 11:07:03 could not greet: rpc error: code = DeadlineExceeded desc = context deadline exceeded`.
This seems different than the behavior of the deprecated resolver package. The cause seems to be the RPC is waiting at https://github.com/grpc/grpc-go/blame/master/picker_wrapper.go#L170 but most of the situations blockingCh are written to are only in response to subconn state changing (but we have no subconns). Am I missing something about how to use the balancer APIs? Or is the expectation that we always at least call NewAddresses with an empty slice (which seems to resolve it has somewhere in the stack it tries to attempt a connection and fails fast). Attached a log of a run when I pass an empty slice and get the desired FailFast behavior. ``` $ GRPC_GO_LOG_SEVERITY_LEVEL=INFO GRPC_GO_LOG_VERBOSITY_LEVEL=1000 go run greeter_client/main.go INFO: 2018/05/07 11:31:44 parsed scheme: "blatux149k5z" INFO: 2018/05/07 11:31:44 ccResolverWrapper: sending new addresses to cc: [{ 0 <nil>}] INFO: 2018/05/07 11:31:44 base.baseBalancer: got new resolved addresses: [{ 0 <nil>}] INFO: 2018/05/07 11:31:44 base.baseBalancer: handle SubConn state change: 0xc420172070, CONNECTING WARNING: 2018/05/07 11:31:44 grpc: addrConn.createTransport failed to connect to { 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: missing address". Reconnecting... INFO: 2018/05/07 11:31:44 base.baseBalancer: handle SubConn state change: 0xc420172070, TRANSIENT_FAILURE 2018/05/07 11:31:44 could not greet: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp: missing address" exit status 1 ``` Thanks, Ashwin -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/a4dbc62d-e314-44c0-af72-dd5bcda6e7ad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
