2349 Commits

Author SHA1 Message Date
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
2739967807 re-enable handler_server in end2end test, and fix some failed tests (#1259) 2017-05-26 08:26:41 -07:00
3a46d9d519 Avoid panic caused by stdlib context package errors (#1258) 2017-05-24 16:01:38 -07:00
72395c537b Initialize stream properly in handler_server. (#1260) 2017-05-24 11:58:17 -07:00
6dff7c5f33 Expand stream's flow control in case of an active read. (#1248)
* First commit

* Imported tests from the original PR by @apolcyn.

* Formatting fixes.

* More formating fixes

* more golint

* Make logs more informative.

* post-review update

* Added test to check flow control accounts after sending large messages.

* post-review update

* Empty commit to kickstart travis.

* Post-review update.
2017-05-23 11:39:15 -07:00
79f73d62e5 Suppress server log message when EOF without receiving data for preface (#1052) 2017-05-22 14:45:37 -07:00
5e42b6f37e Fixed comment spelling (#1254) 2017-05-22 13:13:07 -07:00
9f919f7b81 Merge pull request #1165 from lyuxuan/service_config_pr
Expand service config support
2017-05-22 11:15:26 -07:00
4a7b4d033a minor fix 2017-05-19 16:38:37 -07:00
cb64938381 fix minor issues 2017-05-19 16:02:02 -07:00