2158 Commits

Author SHA1 Message Date
d69dedd8b7 BDP estimation and window update. (#1310) 2017-07-11 13:00:55 -07:00
93166a0b0b Canonicalize https://grpc.io as the preferred URL prefix 2017-07-10 16:28:39 -07:00
37be128ebf Update leckCheck to ignore non-gRPC goroutine introduced in Go1.9 (#1351) 2017-07-10 14:58:33 -07:00
41d9b6ea2a Do not flush NewStream header on client side for unary RPCs and streaming RPCs with requests. (#1343)
If it's not client streaming, we should already have the request to be sent,
so we don't flush the header.
If it's client streaming, the user may never send a request or send it any
time soon, so we ask the transport to flush the header.

And flush header even without metadata
2017-07-05 16:51:14 -07:00
0100e4262c adjust import order (#1311) 2017-07-05 09:03:39 -07:00
3c33c26290 add license for some proto files (#1322) 2017-06-27 09:54:34 -07:00
9cb02b885b latency: sleep in Write when BDP is exceeded to avoid buffer bloat (#1330) 2017-06-26 16:20:44 -07:00
77d4a9f456 Add documentation to deprecate WithTimeout dial option (#1333) 2017-06-26 15:18:57 -07:00
eb7b130505 change objects in recvBuffer queue from interface to concrete type to reduce allocs (#1029) 2017-06-26 15:04:42 -07:00
57ff3285cf Catch invalid use of Server.RegisterService after Register.Serve (#828) 2017-06-26 10:39:47 -07:00
f0c566b827 benchmark: add latency/MTU/bandwidth into testcases (#1304) 2017-06-23 14:22:51 -07:00
2f3320d9d6 Updated documentation of ClientStream. (#1320) 2017-06-23 13:57:58 -07:00
1d797552ae Add support for grpc.SupportPackageIsVersion3 back (#1331)
* Support byte slice file descriptor as metadata and add SupportPackageIsVersion3 back

* add v3 test, generate testv3.pb.go with old codegen
2017-06-22 13:56:59 -07:00
8855ede8e3 Deflake TestServerGoAway (#1321) 2017-06-22 11:54:19 -07:00
79fc236e5f dont create new reader in recvMsg (#940) 2017-06-22 10:37:15 -07:00
306d7d084b Make Apache 2.0 LICENSE file a verbatim copy (#1329) 2017-06-21 10:20:47 -07:00
40e7a759a0 Protect bytesSent and bytesReceived with mutex to avoid datarace (#1318) 2017-06-19 13:57:38 -07:00
2887f9478e Add Severity and VerboseLevel to grpclog. (#922)
* Add Severity and VerboseLevel to grpclog.

* keep old interface and add loggerv2

* export NewLoggerv2
2017-06-19 13:57:04 -07:00
ea14354640 update LICENSE (#1312) 2017-06-19 10:16:33 -07:00
c5c761dbca fix spell (#1314) 2017-06-16 09:59:37 -07:00
c6b9664180 Add goroutine safety doc on stream (#1313) 2017-06-15 15:24:17 -07:00
834dbd54e0 replace 127.0.0.1 with localhost for ipv6 only environment (#1306) 2017-06-14 15:03:04 -07:00
7df48bee88 transport: fix error handling on Stream deletion (#1275)
This patch writes client-side error before closing the active stream
to fix blocking `RecvMsg` issue on `grpc.ClientStream` [1].

Previous gRPC client stream just exits on `ClientTransport.Error` [2].
And latest gRPC added another select case on client connection context
cancel [3]. Now when client stream closes from client connection context
cancel, it calls `CloseStream` with `ErrClientConnClosing` error. And then
the stream gets deleted from `*http2Client.activeStreams`, without processing
the error [4]. Then in-flight `RecvMsg` call on this client will block on
`*parser.Reader.recvMsg` [5].

In short,

1. `ClientConn.Close`.
2. in-flight streams will receive case `<-cc.ctx.Done()`
   https://github.com/grpc/grpc-go/blob/master/stream.go#L253-L255.
3. `cs.closeTransportStream(ErrClientConnClosing)` calls `cs.t.CloseStream(cs.s, err)`.
4. `CloseStream(cs.s, err)` calls `delete(t.activeStreams, s.id)`
   without handling the error.
5. in-flight streams will never receive error, left hanging.

I can reproduce in etcd tests with in-flight `recvMsg` calls to `Observe` RPC.

---
[1] https://github.com/coreos/etcd/pull/7896#issuecomment-305241742
[2] https://github.com/grpc/grpc-go/blob/v1.2.x/stream.go#L235-L238
[3] https://github.com/grpc/grpc-go/pull/1136
[4] https://github.com/grpc/grpc-go/blob/master/transport/http2_client.go#L569
[5] https://github.com/grpc/grpc-go/blob/master/rpc_util.go#L280

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-14 14:35:09 -07:00
a3592bda22 Behaviour Change: transport errors should be coded Unavailable instead of internal. (#1307) 2017-06-14 14:21:20 -07:00
1ab4adf22d Support ipv6 addresses in grpclb (#1303)
Add square brackets to ipv6 addresses, otherwise net.Dial() and
net.SplitHostPort() will return too many colons error.
2017-06-13 13:43:09 -07:00
89caed9e62 Return header in Stream.Header() if available (#1281)
* Return header in Stream.Header() if available

Add additional nonblocking select clause that would
check if the header is available and return it if it is.

Current implementation of transport Header often
doesn't return header, but a cancel error even though
the top level context is not canceled and the rpc
is successful and a header is actually available.
It's caused by the fact that select can choose any
"ready" channel.
Retrieving headers is flaky. With this fix, headers
are consistently retrieved for successful rpcs.

* Return header both when cancel and go away
2017-06-13 11:34:50 -07:00
a94a7ac054 add license for some files (#1296) 2017-06-12 18:10:06 -07:00
20e03965ab Make RPCs non-failfast in grpclb_test. (#1302) 2017-06-12 17:54:35 -07:00
0c68d6e2f2 Specify characters allowed in metadata keys (#1299) 2017-06-12 15:05:52 -07:00
ba30de56b8 use subtests for the benchmark_test and add it into the Makefile (#1278)
* use subtests for the benchmark_test and add it into the Makefile

* benchmark: keep the original benchmark_test as version 16. use subtests benchmark as 17
2017-06-12 14:52:33 -07:00
84158ac547 update the path of guide (#950) 2017-06-09 14:05:01 -07:00
cfd21dac77 Create latency package for realistically simulating network latency (#1286) 2017-06-09 09:24:50 -07:00
dbdb479a60 Deflake TestFlowContolLogicalRace (#1279) 2017-06-08 12:54:42 -07:00
d1cd1551aa Merge pull request #1290 from jtattermusch/apache_license
Update LICENSE to apache 2
2017-06-08 18:53:08 +02:00
a185794240 patents are part of Apache2 license 2017-06-08 14:44:28 +02:00
ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
3c7e64ff7f add AUTHORS and LICENSE 2017-06-08 14:37:28 +02:00
06c984861f Change version to 1.5.0-dev (#1288) 2017-06-07 15:15:26 -07:00
d2a85bf7ad transport: fix minor typo in 'GoAway' godoc (#1284)
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-06 11:38:41 -07:00
8de2dff78c Piggyback window updates for connection with those of a stream. (#1273) 2017-06-05 10:25:41 -07:00
6fecf2831a Reopening: Server shouldn't Fatalf in case it fails to encode. (#1276)
* Server shouldn't Fatalf in case it fails to encode.
2017-06-02 12:32:37 -07:00
a8cd0c13a4 Avoid int32 overflow when applying initial window size setting 2017-06-01 12:36:46 -07:00
843116533a Revert "Server shouldn't Fatalf in case it fails to encode. (#1251)" (#1274)
This reverts commit d5bc85c1e9a36225ecc02757efcc874e13962973.
2017-06-01 12:34:28 -07:00
d5bc85c1e9 Server shouldn't Fatalf in case it fails to encode. (#1251)
* Server shouldn't Fatalf in case it fails to encode.

* golint

* post-review update
2017-06-01 11:57:45 -07:00
1e47334c73 Decouple transport flow control from application read. (#1265)
* Decouple transport flow control from application read.

* post-review update

* Added comment in http2_server as well.

* Added another test

* Fixed typos in comments.
2017-06-01 09:42:07 -07:00
a113590521 Update references to route_guide.proto to use new directory name (#1270)
route_guide.proto used to be in a directory called proto. It was renamed
to routeguide but the code/README still referred to the previous
directory name.

Signed-off-by: Steven Erenst <stevenerenst@gmail.com>
2017-05-31 14:16:25 -07:00
6bb76488de add MaxConcurrentStreams to benchmark_test when start the server (#1271) 2017-05-31 14:15:37 -07:00
bb3728664d Merge pull request #1267 from jtattermusch/improve_contributing
Improve contributing.md and add issue template
2017-05-31 10:47:58 -07:00
e49f6f2d13 Update CONTRIBUTING.md 2017-05-30 20:06:49 -07:00
0294ac816d Create ISSUE_TEMPLATE 2017-05-30 20:03:09 -07:00