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

embed: wait up to request-timeout for pending RPCs when closing #8267

Merged
merged 2 commits into from
Jul 15, 2017

Commits on Jul 14, 2017

  1. embed: wait up to request timeout for pending RPCs when closing

    Both grpc.Server.Stop and grpc.Server.GracefulStop close the listeners
    first, to stop accepting the new connections. GracefulStop blocks until
    all clients close their open transports(connections). Unary RPCs
    only take a few seconds to finish. Stream RPCs, like watch, might never
    close the connections from client side, thus making gRPC server wait
    forever.
    
    This patch still calls GracefulStop, but waits up to 10s before manually
    closing the open transports.
    
    Address etcd-io#8224.
    
    Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
    gyuho committed Jul 14, 2017
    Configuration menu
    Copy the full SHA
    334554f View commit details
    Browse the repository at this point in the history
  2. integration: test embed.Etcd.Close with watch

    Ensure 'Close' returns in time when there are open
    connections (watch streams).
    
    Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
    gyuho committed Jul 14, 2017
    Configuration menu
    Copy the full SHA
    34fd848 View commit details
    Browse the repository at this point in the history