dfawley
2bb3182589
Fix bufconn.Close to not be blocking. ( #1377 )
2017-07-20 14:09:45 -07:00
Menghan Li
98eab9baf6
Do not create new addrConn when connection error happens ( #1369 )
2017-07-20 13:22:59 -07:00
Menghan Li
2b21bfb96b
Change version to 1.6.x ( #1382 )
2017-07-20 13:19:54 -07:00
dfawley
939edc09d6
Revert "Use bufconn in end2end tests." ( #1381 )
...
This reverts commit c7e2c00ed1 .
There is a race between Dial and Close that causes goroutine leaks in the
end2end tests.
2017-07-19 13:57:37 -07:00
Vitaly Isaev
71260d2171
Fix logging method ( #1375 )
2017-07-18 10:25:36 -07:00
Doug Fawley
c7e2c00ed1
Use bufconn in end2end tests.
2017-07-17 17:09:17 -07:00
Doug Fawley
9a71c7940b
Create bufconn package for a local, buffered net.Conn and dialer/listener
2017-07-17 17:09:17 -07:00
Seiichi Uchida
ce03e9cc71
Fix a typo in examples/gotutorial.md ( #1374 )
2017-07-17 10:25:45 -07:00
Menghan Li
d6723916d2
Use log severity and verbosity level ( #1340 )
...
- All logs use 1 severity level instead of printf
- All transport logs only go to verbose level 2+
- The default logger only log errors and verbosity level 1
- Add environment variable GRPC_GO_LOG_SEVERITY_LEVEL and GRPC_GO_LOG_VERBOSITY_LEVEL to set severity or verbosity levels for the default logger
2017-07-13 12:10:19 -07:00
Le Van Nghia
27b2052c95
fix deadlock of roundrobin balancer ( #1353 )
2017-07-12 10:15:13 -07:00
mmukhi
8264d619d8
Ignore goroutines spanwned by log.init during leakcheck. ( #1368 )
2017-07-11 14:55:05 -07:00
Cesar Ghali
86ec6baad9
Populate callInfo.peer object for streaming RPCs ( #1356 )
2017-07-11 13:56:13 -07:00
mmukhi
d69dedd8b7
BDP estimation and window update. ( #1310 )
2017-07-11 13:00:55 -07:00
Mehrdad Afshari
93166a0b0b
Canonicalize https://grpc.io as the preferred URL prefix
2017-07-10 16:28:39 -07:00
mmukhi
37be128ebf
Update leckCheck to ignore non-gRPC goroutine introduced in Go1.9 ( #1351 )
2017-07-10 14:58:33 -07:00
Menghan Li
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
dfawley
9cb02b885b
latency: sleep in Write when BDP is exceeded to avoid buffer bloat ( #1330 )
2017-06-26 16:20:44 -07:00
Menghan Li
77d4a9f456
Add documentation to deprecate WithTimeout dial option ( #1333 )
2017-06-26 15:18:57 -07:00
apolcyn
eb7b130505
change objects in recvBuffer queue from interface to concrete type to reduce allocs ( #1029 )
2017-06-26 15:04:42 -07:00
Peter Mattis
57ff3285cf
Catch invalid use of Server.RegisterService after Register.Serve ( #828 )
2017-06-26 10:39:47 -07:00
ZhouyihaiDing
f0c566b827
benchmark: add latency/MTU/bandwidth into testcases ( #1304 )
2017-06-23 14:22:51 -07:00
MakMukhi
2f3320d9d6
Updated documentation of ClientStream. ( #1320 )
2017-06-23 13:57:58 -07:00
Menghan Li
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
MakMukhi
8855ede8e3
Deflake TestServerGoAway ( #1321 )
2017-06-22 11:54:19 -07:00
apolcyn
79fc236e5f
dont create new reader in recvMsg ( #940 )
2017-06-22 10:37:15 -07:00
Mehrdad Afshari
306d7d084b
Make Apache 2.0 LICENSE file a verbatim copy ( #1329 )
2017-06-21 10:20:47 -07:00
Menghan Li
40e7a759a0
Protect bytesSent and bytesReceived with mutex to avoid datarace ( #1318 )
2017-06-19 13:57:38 -07:00
Menghan Li
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
Menghan Li
ea14354640
update LICENSE ( #1312 )
2017-06-19 10:16:33 -07:00
田欧
c5c761dbca
fix spell ( #1314 )
2017-06-16 09:59:37 -07:00
Menghan Li
c6b9664180
Add goroutine safety doc on stream ( #1313 )
2017-06-15 15:24:17 -07:00
Menghan Li
834dbd54e0
replace 127.0.0.1 with localhost for ipv6 only environment ( #1306 )
2017-06-14 15:03:04 -07:00
Gyu-Ho Lee
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
MakMukhi
a3592bda22
Behaviour Change: transport errors should be coded Unavailable instead of internal. ( #1307 )
2017-06-14 14:21:20 -07:00
Menghan Li
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
Justyna Ilczuk
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
Menghan Li
20e03965ab
Make RPCs non-failfast in grpclb_test. ( #1302 )
2017-06-12 17:54:35 -07:00
Menghan Li
0c68d6e2f2
Specify characters allowed in metadata keys ( #1299 )
2017-06-12 15:05:52 -07:00
ZhouyihaiDing
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
dfawley
cfd21dac77
Create latency package for realistically simulating network latency ( #1286 )
2017-06-09 09:24:50 -07:00
MakMukhi
dbdb479a60
Deflake TestFlowContolLogicalRace ( #1279 )
2017-06-08 12:54:42 -07:00
Jan Tattermusch
d1cd1551aa
Merge pull request #1290 from jtattermusch/apache_license
...
Update LICENSE to apache 2
2017-06-08 18:53:08 +02:00
Jan Tattermusch
a185794240
patents are part of Apache2 license
2017-06-08 14:44:28 +02:00
Jan Tattermusch
ddbf6c46a6
autofix license notice
2017-06-08 14:42:19 +02:00
Jan Tattermusch
3c7e64ff7f
add AUTHORS and LICENSE
2017-06-08 14:37:28 +02:00
Menghan Li
06c984861f
Change version to 1.5.0-dev ( #1288 )
2017-06-07 15:15:26 -07:00