2489 Commits

Author SHA1 Message Date
5ba054bf37 encoding: Introduce new method for registering and choosing codecs (#1813) 2018-01-23 11:39:40 -08:00
4f7a2c71d3 compare atomic and mutex performance in case of contention. (#1788) 2018-01-22 18:48:20 -08:00
b71aced4a2 transport: Fix a data race when headers are received while the stream is being closed (#1814) 2018-01-19 09:37:59 -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
10598f3eb3 Explain target format in DialContext's documentation (#1785) 2018-01-18 13:10:52 -08:00
08b7bd3beb gzip: add Name const to avoid typos in usage (#1804) 2018-01-17 13:28:07 -08:00
8b02d69fd2 remove .please-update (#1800) 2018-01-17 13:27:51 -08:00
1cd234627e Documentation: update broken wire.html link in metadata package. (#1791)
https://grpc.io/docs/guides/wire.html is no longer valid.

Looking at an archived version of that page
(https://web.archive.org/web/20171006045517/https://grpc.io/docs/guides/wire.html)
it looks equilavent to what is now posted at:
https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md.

The gRPC guide: https://grpc.io/docs/guides/ contains a link in the
sidebar navigation to the same page, so pretty sure it's correct.
2018-01-10 10:25:54 -08:00
6913ad5cae Document that all errors from RPCs are status errors (#1782) 2018-01-05 15:37:05 -08:00
8a8ac82f1f update const order (#1770) 2018-01-04 15:44:29 -08:00
e975017b47 Don't set reconnect parameters when the server has already responded. (#1779) 2018-01-04 11:16:47 -08:00
7aea499f91 credentials: return Unavailable instead of Internal for per-RPC creds errors (#1776)
Or if `PerRPCCredentials` returns a `status` error, honor that instead.
2018-01-03 09:47:07 -08:00
c998149a22 Avoid copying headers/trailers in unary RPCs unless requested by CallOptions (#1775)
CPU profile shows that header copy takes a large proportion of CPU usage in a gRPC Call.
If the header is not needed, we don't need to pay the cost.
2018-01-03 09:13:06 -08:00
82462103d1 Update version to 1.10.0-dev (#1777) 2018-01-02 16:35:01 -08:00
17c6e90cd5 compare atomic and mutex performance for incrementing/storing one variable (#1757) 2018-01-02 10:46:13 -08:00
65c901e458 Fix flakey test. (#1771) 2017-12-28 09:31:16 -08:00
7f2472bbc6 grpclb: Remove duplicate init() (#1764) 2017-12-22 13:43:22 -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
0547980095 Notify parent ClientConn to re-resolve in grpclb (#1699)
The parent ClientConn should re-resolve when grpclb loses connection to the
remote balancer.

When the ClientConn inside grpclb gets a TransientFailure, it calls
lbManualResolver.ResolveNow(), which calls parent ClientConn's ResolveNow, and
eventually results in re-resolve happening in parent ClientConn's resolver (DNS
for example).

This PR adds a method to balancer.ClientConn interface, so balancer can tell
parent ClientConn to re-resolve.
2017-12-18 15:36:55 -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
6610f9a340 Fix test: Data race while resetting global var. (#1748) 2017-12-18 15:27:23 -08:00
f4b523765c status: add Code convenience function (#1754) 2017-12-18 15:00:50 -08:00
47bddd7d06 vet: run golint on _string files (#1749)
We didn't run this because codes_string.go was generated by stringer. And we no longer use stringer.
2017-12-18 10:58:57 -08:00
45088c2971 examples: fix concurrent map accesses in route_guide server (#1752) 2017-12-18 10:21:30 -08:00
4e393e0b21 grpc: fix deprecation comments to conform to standard (#1691) 2017-12-18 09:23:42 -08:00
0b24825eb1 Adjust keepalive paramenters in the test such that scheduling delays don't cause false failures too often. (#1730) 2017-12-15 16:03:42 -08:00
f9390a7b4d fix typo (#1746) 2017-12-15 14:50:30 -08:00
6ef45d3689 fix stats flaky test (#1740)
1. Call transport Close if newHTTP2Server returns non-nil error.
Handle ConnBegin was called before this error, and handle ConnEnd is not called (because Close() is not called), which caused ConnStats check to fail.

2. Skip stats test in go1.6.
go1.6 doesn't have DialContext (we use Dialer(Cancel: ctx.Done()) instead). When the give context is canceled, this function sometimes returns canceled error, while the server side still gets the conn. This caused the server blocking on reading the preface (which will eventually timeout, but the tests are too short for that), and there will be a missing ConnEnd.
2017-12-15 14:37:20 -08:00
98b17f20a2 relocate check for shutdown in ac.tearDown() (#1723) 2017-12-15 12:03:41 -08:00
5ff10c3b65 fix flaky TestPickfirstOneAddressRemoval (#1731) 2017-12-14 15:42:58 -08:00
2625f0335f bufconn: allow readers to receive data after writers close (#1739) 2017-12-14 15:17:55 -08:00
b0e0950972 After sending second goaway close conn if idle. (#1736) 2017-12-14 14:57:47 -08:00
b8cf13ea06 Make sure all goroutines have ended before restoring global vars. (#1732) 2017-12-14 13:23:05 -08:00
4742c425a7 client: fix race between server response and stream context cancellation (#1729)
* While waiting for headers from the server, client should wait on error chans as well.

* Stream read shouldn't wait on transport ctx
2017-12-14 13:19:12 -08:00
8fba5fc8fd In gracefull stop close server transport only after flushing status of the last stream. (#1734) 2017-12-13 16:09:49 -08:00
d1fc8fa770 Deflake tests that rely on Stop() then Dial() not reconnecting (#1728) 2017-12-13 09:30:53 -08:00
dba60db4f4 Switch balancer to grpclb when at least one address is grpclb address (#1692) 2017-12-12 12:45:05 -08:00
cce0e436e5 Merge pull request #1724 from grpc/jtattermusch-patch-1
Update CONTRIBUTING.md to CNCF CLA
2017-12-11 09:35:50 -08:00
ca1b23bf3e Update CONTRIBUTING.md to CNCF CLA 2017-12-11 09:04:48 -08:00
2941ee12eb codes: Add UnmarshalJSON support to Code type (#1720) 2017-12-11 09:02:19 -08:00
ec61302c8e naming: Fix build constraints for go1.6 and go1.7 (#1718)
"go1.6, !go1.8" constraints are interpreted as (version >= 1.6 AND ) OR version < 1.8, where (version >= 1.6 AND ) is always false,
so it matches all go versions before 1.8, not only 1.6 and 1.7.

Removed a space, so the constraints are now matches only go1.6 and go1.7 versions
2017-12-07 12:43:58 -08:00
b8191e57b2 remove stringer and go generate (#1715) 2017-12-06 17:35:20 -08:00
ff1be3fcc5 Add WithResolverUserOptions for custom resolver build options (#1711) 2017-12-06 15:54:01 -08:00
580defabfe Fix grpc basics link in route_guide example (#1713) 2017-12-06 15:11:16 -08:00
b7dc71e7ea Optimize codes.String() method using a switch instead of a slice of indexes (#1712) 2017-12-06 10:50:43 -08:00
1fc873d0f6 Disable ccBalancerWrapper when it is closed (#1698) 2017-12-06 10:49:20 -08:00
bf35f1b961 Refactor roundrobin to support custom picker (#1707)
Split round_robin balancer into a base balancer (which manages SubConn and connectivity states), and a round_robin picker.
A custom picker with other picking algorithms can be provided to build custom balancers.
2017-12-05 11:27:28 -08:00
43083423e4 Change parseTimeout to not handle non-second durations (#1706) 2017-12-05 10:04:04 -08:00