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

clientv3/integration: fix TestSetEndpointAndPut dial tests #8869

Closed
wants to merge 1 commit into from

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Nov 14, 2017

Fix #8859.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
@gyuho gyuho requested a review from xiang90 November 14, 2017 18:47
// grpc/transport.ErrConnClosing or grpc/transport.ErrConnDrain on balancer endpoint switch
if err != nil &&
!strings.Contains(err.Error(), "transport is closing") &&
!strings.Contains(err.Error(), "the server stops accepting new RPCs") {
Copy link
Contributor

Choose a reason for hiding this comment

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

why we might receive a server side error triggered by a endpoint switch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Balancer switch might not have completed, so errors return while gRPC drains current connection and creates a new sub connection.

Copy link
Contributor

Choose a reason for hiding this comment

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

transport is closing makes sense. i was asking why we can see the server stops.... gRPC client draining connection has nothing to do with the server.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gRPC client draining connection has nothing to do with the server.

This error message is more about gRPC http/2 client telling the current connection has been drained.

  1. tearDown on current *addrConn(errConnDrain)
  2. ac.transport.GracefulClose() that prevents new streams from being created, setting the connection state to drain

So, it is the http2Client that returns ErrStreamDrain error, not from the server.

@gyuho
Copy link
Contributor Author

gyuho commented Feb 2, 2018

This needs rework after grpc/grpc-go#1844 is merged.

@gyuho gyuho closed this Feb 2, 2018
@gyuho gyuho deleted the drain-error branch February 2, 2018 18:25
@gyuho gyuho removed the WIP label Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants