Don't log grpclb server ending connection as error (#2162)

Fixes https://github.com/grpc/grpc-go/issues/2161

I introduced `serverTerminatedConnectionErr `, because I wanted `callRemoteBalancer` to still returns error on a terminated connections. Its client, which is function `watchRemoteBalancer` can decide how to log this error.

When remote grpclb-server terminates the connection, don't log it as
error. Instead, log it as info.

It is natural for servers to terminate long lived grpc streaming
connections. Two sample reasons to do this are: load balancing and
deployment of a new version. Therefore client of grpclb-server shouldn't
recognise this situation as an error.

2 files changed
tree: a2ed693964ce8730c61329e1e67272ba5ce30625
  1. .github/
  2. balancer/
  3. benchmark/
  4. channelz/
  5. codes/
  6. connectivity/
  7. credentials/
  8. Documentation/
  9. encoding/
  10. examples/
  11. grpclb/
  12. grpclog/
  13. health/
  14. internal/
  15. interop/
  16. keepalive/
  17. metadata/
  18. naming/
  19. peer/
  20. reflection/
  21. resolver/
  22. stats/
  23. status/
  24. stress/
  25. tap/
  26. test/
  27. testdata/
  28. transport/
  29. .travis.yml
  30. AUTHORS
  31. backoff.go
  32. balancer.go
  33. balancer_conn_wrappers.go
  34. balancer_switching_test.go
  35. balancer_test.go
  36. balancer_v1_wrapper.go
  37. call.go
  38. call_test.go
  39. clientconn.go
  40. clientconn_test.go
  41. codec.go
  42. codec_test.go
  43. codegen.sh
  44. CONTRIBUTING.md
  45. doc.go
  46. envconfig.go
  47. go16.go
  48. go17.go
  49. interceptor.go
  50. LICENSE
  51. Makefile
  52. picker_wrapper.go
  53. picker_wrapper_test.go
  54. pickfirst.go
  55. pickfirst_test.go
  56. proxy.go
  57. proxy_test.go
  58. README.md
  59. resolver_conn_wrapper.go
  60. resolver_conn_wrapper_test.go
  61. rpc_util.go
  62. rpc_util_test.go
  63. server.go
  64. server_test.go
  65. service_config.go
  66. service_config_test.go
  67. stickiness_linkedmap.go
  68. stickiness_linkedmap_test.go
  69. stickiness_test.go
  70. stream.go
  71. trace.go
  72. version.go
  73. vet.sh
README.md

gRPC-Go

Build Status GoDoc GoReportCard

The Go implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the gRPC Quick Start: Go guide.

Installation

To install this package, you need to install Go and setup your Go workspace on your computer. The simplest way to install the library is to run:

$ go get -u google.golang.org/grpc

Prerequisites

This requires Go 1.6 or later. Go 1.7 will be required soon.

Constraints

The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the list, you need a discussion with gRPC-Go authors and consultants.

Documentation

See API documentation for package and API descriptions and find examples in the examples directory.

Performance

See the current benchmarks for some of the languages supported in this dashboard.

Status

General Availability Google Cloud Platform Launch Stages.

FAQ

Compiling error, undefined: grpc.SupportPackageIsVersion

Please update proto package, gRPC package and rebuild the proto files:

  • go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
  • go get -u google.golang.org/grpc
  • protoc --go_out=plugins=grpc:. *.proto