368 Commits

Author SHA1 Message Date
738eb6b62f fix minor typos and remove grpc.Codec related code in TestInterceptorCanAccessCallOptions (#1929) 2018-03-19 14:19:42 -07:00
fa28bef939 client: export types implementing CallOptions for access by interceptors (#1902) 2018-03-16 15:57:34 -07:00
3926816d54 addrConn: Report underlying connection error in RPC error (#1855) 2018-02-14 14:13:10 -08:00
445b7284b1 Fix data race in TestServerGoAwayPendingRPC (#1862) 2018-02-13 16:48:27 -08:00
484b3ebb4a transport: fix race causing flow control discrepancy when sending messages over server limit (#1859)
* In case of an error write transport quota back.

* Added test.
2018-02-13 11:17:19 -08:00
365770fcbd streams: Stop cleaning up after orphaned streams (#1854)
This change introduces some behavior changes that should not impact users that
are following the proper stream protocol. Specifically, one of the following
conditions must be satisfied:

1. The user calls Close on the ClientConn.
2. The user cancels the context provided to NewClientStream, or its deadline
    expires. (Note that it if the context is no longer needed before the deadline
    expires, it is still recommended to call cancel to prevent bloat.) It is always
    recommended to cancel contexts when they are no longer needed, and to
    never use the background context directly, so all users should always be
    doing this.
3. The user calls RecvMsg (or Recv in generated code) until a non-nil error is
    returned.
4. The user receives any error from Header or SendMsg (or Send in generated
    code) besides io.EOF.  If none of the above happen, this will leak a goroutine
    and a context, and grpc will not call the optionally-configured stats handler
    with a stats.End message.

Before this change, if a user created a stream and the server ended the stream,
the stats handler would be invoked with a stats.End containing the final status
of the stream. Subsequent calls to RecvMsg would then trigger the stats handler
with InPayloads, which may be unexpected by stats handlers.
2018-02-08 10:51:16 -08:00
d09ec43545 Implement unary functionality using streams (#1835) 2018-02-05 12:54:13 -08:00
424e3e9894 Stream: do not cancel ctx created with service config timeout (#1838) 2018-02-02 10:35:15 -08:00
f9628db66d Fix lint error and typo (#1843) 2018-02-01 11:38:14 -08:00
c22018a9fb client: send RST_STREAM on client-side errors to prevent server from blocking (#1823) 2018-01-24 11:18:05 -08:00
5ba054bf37 encoding: Introduce new method for registering and choosing codecs (#1813) 2018-01-23 11:39:40 -08:00
46bef23bc3 Write should fail when the stream was done but context wasn't cancelled. (#1792) 2018-01-18 15:49:00 -08:00
09fc336d84 server: fix bug preventing Serve from exiting when Listener is closed (#1765) 2017-12-22 12:42:04 -08:00
035eb475a7 Fix TestGracefulStop flakiness (#1767) 2017-12-22 12:39:56 -08:00
2720857d97 server: fix race between GracefulStop and new incoming connections (#1745)
New connections can race with GracefulStop such that the server will accept the connection, but then close it immediately. If a connection is accepted before GracefulStop has a chance to effectively cancel the listeners, the server should handle it to avoid client errors.
2017-12-18 15:38:51 -08:00
e6549e636d Add dial option to set balancer (#1697)
WithBalancerName dial option specifies the name of the balancer to be used by the ClientConn. Service config updates can NOT override the balancer option.
2017-12-18 15:35:42 -08:00
f4b523765c status: add Code convenience function (#1754) 2017-12-18 15:00:50 -08:00
4e393e0b21 grpc: fix deprecation comments to conform to standard (#1691) 2017-12-18 09:23:42 -08:00
2625f0335f bufconn: allow readers to receive data after writers close (#1739) 2017-12-14 15:17:55 -08:00
d1fc8fa770 Deflake tests that rely on Stop() then Dial() not reconnecting (#1728) 2017-12-13 09:30:53 -08:00
43083423e4 Change parseTimeout to not handle non-second durations (#1706) 2017-12-05 10:04:04 -08:00
d6cc72862b switch balancer based on service config info (#1670) 2017-11-17 11:11:05 -08:00
816fa5b06f Add proper support for 'identity' encoding type (#1664) 2017-11-17 09:24:54 -08:00
409fd8e23b addrConn: set ac.state to TransientFailure upon non-temporary errors (#1657)
So failfast RPCs will fail with unavailable errors when this happens.
2017-11-13 16:33:42 -08:00
8ff8683602 Implement transparent retries for gRFC A6 (#1597) 2017-11-06 13:45:11 -08:00
865013bc17 *: replace deprecated grpc.Errorf calls with status.Errorf (#1651) 2017-11-06 10:24:20 -08:00
5db344a40a Introduce new Compressor/Decompressor API (#1428) 2017-10-31 10:21:13 -07:00
a4ff4e29c4 Get method string from stream (#1588) 2017-10-26 16:03:44 -07:00
0d399e6307 Remove self-imposed limit on max concurrent streams if the server doesn't impose any. (#1624)
* Remove self-imposed limit on max concurrent streams if the server allows it.

* Remove test necessitating buggy behavior.
2017-10-26 10:05:17 -07:00
1687ce5770 ClientHandshake should get the dialing endpoint as the authority (#1607) 2017-10-23 11:40:43 -07:00
6f3b6ff46b Parse ServiceConfig JSON string (#1515) 2017-10-19 12:09:19 -07:00
a353537ff5 Register and use default balancers and resolvers (#1551) 2017-10-19 11:32:06 -07:00
c06db1c7c5 Skip proxy_test in race mode (#1584) 2017-10-17 11:26:58 -07:00
5131c1f096 Use proto3 in interop tests and end2end tests (#1574) 2017-10-12 14:05:19 -07:00
c8405557a4 Remove Go1.6 support (#1492) 2017-10-04 13:57:10 -07:00
3bf110cd0c fix TestServerCredsDispatch and stats test race (#1554) 2017-10-03 17:07:39 -07:00
4bbdf230d7 New implementation of roundrobin and pickfirst (#1506) 2017-10-02 09:22:57 -07:00
59cb69e66d Fix misspells (#1531) 2017-09-20 14:55:57 -07:00
a7dba25a82 Speed up end to end tests by removing an unnecessary sleep (#1521) 2017-09-18 11:48:03 -07:00
894322f00c Dedicated goroutine for writing. (#1498) 2017-09-14 13:44:14 -07:00
067cb1fcbf Add RegisterIgnoreGoroutine to leakcheck package (#1507) 2017-09-07 09:57:31 -07:00
8233e124e4 Add new Resolver and Balancer APIs (gRFC L9) (#1408)
- Add package balancer and resolver.
 - Change ClientConn internals to new APIs and adds a wrapper for v1 balancer.
2017-08-31 10:59:09 -07:00
e67952ee26 Move leak check into a separate leakcheck package (#1445) 2017-08-31 10:16:06 -07:00
e60698345e Fix context warnings from govet. (#1486)
Pre-req work for #1484
2017-08-29 11:04:15 -07:00
0b4b292f3a transport: fix handling of InTapHandle's returned context (#1461) 2017-08-25 13:18:45 -07:00
69abda08b5 stats: add methods to allow setting grpc-trace-bin and grpc-tags-bin headers (#1404)
This is in preparation for preventing any user-supplied metadata starting with "grpc-", which is reserved.

* stats: add methods to allow setting grpc-trace-bin and grpc-tags-bin headers

Pick these up in grpc's transport when sending and fill them when receiving.

* Add tags/trace to metadata and tests for that behavior

This is temporary to maintain compatibility and provide a migration strategy.
2017-08-24 10:00:40 -07:00
25b4a426b4 go-generate pb.go files and check in Travis to make sure they don't change (#1426) 2017-08-17 16:00:51 -07:00
9d99afc2fd Automatic WriteStatus for RecvMsg/SendMsg error on server side (#1409)
automatically WriteStatus if there's any error when RecvMsg/SendMsg on server side.
2017-08-14 12:24:23 -07:00
e81b5698fd Add and use connectivity package for states (#1430)
* Add and use connectivity package
* Mark cc state APIs as experimental
2017-08-09 10:31:12 -07:00
059280c96e Set peer before sending request (#1423) 2017-08-07 10:39:34 -07:00