2419 Commits

Author SHA1 Message Date
3ae2a613bc interop: Add use_alts flag to client and server binaries (#1896) 2018-03-07 10:21:48 -08:00
5190b068e2 ALTS: Simplify "New" APIs (#1895)
ALTS NewClientALTS and NewServerALTS APIs are in the grpc/credentials/alts package. Having the term ALTS in the API names is redundant. This PR removes it.
2018-03-07 09:14:47 -08:00
7c5299d71e Fix flaky test: TestCloseConnectionWhenServerPrefaceNotReceived (#1870)
* Atomically update minConnectTimeout in test.

* Refactor the flaky test.

* Post review update

* mend
2018-03-02 13:39:55 -08:00
f0a1202acd examples: Replace context.Background with context.WithTimeout (#1877) 2018-02-28 15:01:36 -08:00
a1de3b2bd6 alts: Change ALTS proto package name (#1886) 2018-02-26 18:05:53 -08:00
2e7e633fea Add ALTS code (#1865) 2018-02-26 17:02:59 -08:00
583a630396 Expunge error codes that shouldn't be returned from library (#1875)
- Per 9d0bc30edb/doc/statuscodes.md
- Relevant issue: #1672
2018-02-22 14:28:59 -08:00
2759199bf7 Small spelling fixes (unknow -> unknown) (#1868) 2018-02-22 13:10:19 -08:00
12da026194 clientconn: fix a typo in GetMethodConfig documentation (#1867) 2018-02-21 10:14:52 -08:00
dfa18343df Change version to 1.11.0-dev (#1863) 2018-02-15 15:27:11 -08:00
46fd263cc8 benchmarks: add flag to benchmain to use bufconn instead of network (#1837)
This will allow us to focus on grpc internals in profiling by excluding the cost of syscalls, which is a significant part of our time spent.
2018-02-15 14:52:38 -08: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
e014063a43 addrConn: keep retrying even on non-temporary errors (#1856) 2018-02-13 16:07:10 -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
6c48c7f5c8 interop test: Expect io.EOF from stream.Send() (#1858) 2018-02-12 14:41:34 -08:00
08d626137c metadata: provide AppendToOutgoingContext interface (#1794)
- Provide AppendToOutgoingContext interface for imrproved performance
over manually creating md and joining with existing md
- Add benchmarks for old/new approaches

Fixes #1390
2018-02-12 11:10:37 -08:00
d50734d1d6 Add status.Convert convenience function (#1848)
This commit adds a function to convert between gRPC errors to
status.Status types without having to deal with an "ok" return value.
2018-02-08 13:15:38 -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
7646b5360d transport: support stats.Handler in serverHandlerTransport (#1840) 2018-02-06 10:11:40 -08:00
104054ade9 Fix connection drain error message (#1844) 2018-02-05 16:08:15 -08:00
d09ec43545 Implement unary functionality using streams (#1835) 2018-02-05 12:54:13 -08:00
37346e3181 Revert "Add WithResolverUserOptions for custom resolver build options" (#1839)
This reverts commit ff1be3fcc57773d500921fad479d82ec171e2358.
2018-02-05 12:52:35 -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
0bd008f5fa stats: Fix bug causing trailers-only responses to be reported as headers (#1817) 2018-01-25 13:54:11 -08:00
5769e02736 transport: remove unnecessary rstReceived (#1834) 2018-01-24 16:54:11 -08:00
0848a0978e transport: remove redundant check of stream state in Write (#1833) 2018-01-24 16:02:52 -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
82e9f61ddd Use keyed fields for struct initializers (#1829) 2018-01-24 10:45:49 -08:00
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