You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
transport.ErrConnDrain (most of the time, we get transport.ErrConnClosing but this still returns to our client intermittently)
This is confusing, because I thought, with latest balancer changes (in v1.7.x), gRPC does not return connection drain error to clients (see #1649). Now our clients are getting transport.ErrConnDrain.
And the error message the server stops accepting new RPCs is confusing, since this is an error returned from *http2Client, not from server.
The draining message was added to support server graceful close. The error message was valid at that time. It was reused when an address is removed by a balancer, ant the message became invalid and confusing in this.
I filed #1844 to fix the error message. But it would be a behavior change, and since you are doing string matching in tests, you might also need to update your tests accordingly. Let me know what you think on the PR.
With transparent retry, when an RPC fails because the picked connection is draining, the RPC will be retried one more time. Since ClientConn always tries to pick a healthy connection to send the RPC, in this retry, another connection would be picked and the RPC will succeed if the second picked connection is working. So even though you may see that the problem is "fixed", it's not. It's just made to be less likely to happen.
What version of gRPC are you using?
v1.7.2
What version of Go are you using (
go version
)?Go 1.9.2
What did you do?
Run etcd client integration tests on gRPC dial path
(
TestSetEndpointAndPut
, https://github.com/coreos/etcd/blob/6f077bd74c5714dfa9221d8f3cb84f856e36ea42/clientv3/integration/dial_test.go#L193-L205)Here's the code path that's being tested
A
to gRPC balancerA
B
B
to gRPC balancertearDown(errConnDrain)
onA
grpc-go/clientconn.go
Lines 1119 to 1130 in cda8a00
*http2Client
returnstransport.ErrStreamDrain
ingrpc-go/transport/http2_client.go
Lines 403 to 406 in cda8a00
What did you expect to see?
transport.ErrConnClosing
What did you see instead?
transport.ErrConnDrain
(most of the time, we gettransport.ErrConnClosing
but this still returns to our client intermittently)This is confusing, because I thought, with latest balancer changes (in v1.7.x), gRPC does not return connection drain error to clients (see #1649). Now our clients are getting
transport.ErrConnDrain
.And the error message
the server stops accepting new RPCs
is confusing, since this is an error returned from*http2Client
, not from server.What's more confusing is now we have 8ff8683#diff-3081f1aaaf958d7d5e00ccec7a62ea6fR413 that might have fixed this issue.
Are
transport.ErrConnDrain
errors to clients expected?c.f. etcd-io/etcd#8859 and etcd-io/etcd#8869
Thanks.
/cc @xiang90
The text was updated successfully, but these errors were encountered: