2491 Commits

Author SHA1 Message Date
9cc4fd4cca Example code on how to mock gRPC services 2016-12-13 13:06:25 -08:00
8712952b7d Merge pull request #1018 from menghanl/serve_error_doc
add always returns non-nil error comment to server.serve()
2016-12-09 13:45:00 -08:00
5ad7c5b8ca add always returns non-nil error comment to server.serve() 2016-12-08 13:48:11 -08:00
7484960149 remove stats.Stop() and fix flaky stats test (#1016) 2016-12-07 17:33:01 -08:00
708a7f9f32 Merge pull request #1008 from ncteisen/stress_test_fix
Add Available Interop Tests to Stress Client
2016-12-02 10:43:27 -08:00
4203221fb9 Lint fix 2016-12-01 17:15:47 -08:00
8da57eb855 Add availible interop tests to stress client 2016-12-01 17:14:11 -08:00
417442a753 transport: fix logical race in flow control (#1005)
Remove the add and cancel methods of quotaPool. Their use is not required, and
leads to logical races when used concurrently from multiple goroutines. Rename
the reset method to add.

The typical way that a goroutine claims quota is to call the add method and
then to select on the channel returned by the acquire method. If two
goroutines are both trying to claim quota from a single quotaPool, the second
call to the add method can happen before the first attempt to read from the
channel. When that happens the second goroutine to attempt the channel read
will end up waiting for a very long time, in spite of its efforts to prepare
the channel for reading.

The quotaPool will always behave correctly when any positive quota is on the
channel rather than stored in the struct field. In the opposite case, when
positive quota is only in the struct field and not on the channel, users of
the quotaPool can fail to access available quota. Err on the side of storing
any positive quota in the channel.

This includes a reproducer for #632, which fails on many runs with this
package at v1.0.4. The frequency of the test failures depends on how stressed
the server is, since it's now effectively checking for weird interleavings of
goroutines. It passes reliably with these changes to the transport package.

The behavior described in #734 (an RPC with a streaming response hangs
unexpectedly) matches what I've seen in my programs, and what I see in the
test case added here. If it's a logical flow control bug, this change may well
fix it.

Updates #632
Updates #734
2016-11-30 17:39:40 -08:00
deb01f422a add stats tagger APIs and connection stats. (#992)
* add stats.tagger APIs and connection stats.

* fix comments

use ac.ctx in http2client
change name and comments
small fixes stats_tests

* add a TODO to ConnTagInfo

* rename handle to handleRPC

* modify stats comments
2016-11-30 16:25:46 -08:00
cc3363f26e Merge pull request #937 from menghanl/reflection_tutorial
Add server-reflection-tutorial.md
2016-11-29 17:57:20 -08:00
c7bdf3912d Merge pull request #997 from ncteisen/stress_client_flags
Add new flags to go stress client
2016-11-29 14:24:20 -08:00
e8e88dedc6 Merge pull request #1003 from xyzzyz/fix_log
Use InfoDepth/FatalDepth in glogger.go
2016-11-29 14:05:45 -08:00
4a119ee276 Use InfoDepth/FatalDepth in glogger.go
This way, log messages will show the proper location where the log
statement originated, instead of "glogger.go:67" or something like that.
2016-11-29 12:51:42 -08:00
87da90422f Add logging of new flags 2016-11-28 17:06:54 -08:00
5e3de3f217 Merge pull request #995 from yangmls/master
correct errors in documentation
2016-11-28 14:26:00 -08:00
eca2ad68af Merge pull request #999 from iamqizhao/interop
fix the flakiness of timeout_on_sleeping_server interop test
2016-11-23 12:59:59 -08:00
f45b8d1e94 fix the flakiness of timeout_on_sleeping_server interop test 2016-11-23 11:35:48 -08:00
e9ab07574f Add new flags to go stress client
Stress client can now handle connections with TLS. It can also use the
custom ca file in the new testdata file.
2016-11-21 17:56:44 -08:00
901cdf6fb5 Post review updates 2016-11-21 14:18:57 -08:00
b7d24ba0eb correct errors in documentation 2016-11-21 16:07:22 +08:00
63bd55dfbf Merge pull request #994 from menghanl/fix_circular_dependency
fix a circular dependency in clientconn_test
2016-11-18 15:23:07 -08:00
4f404a1c98 fix a circular dependency in clientconn_test 2016-11-18 15:01:12 -08:00
97fb58a27f go tool vet again 2016-11-18 14:29:23 -08:00
45907c27fa go tool vet rectification 2016-11-18 14:23:08 -08:00
058907d033 refactored and rectified test failures 2016-11-18 13:55:04 -08:00
93111e4c27 sending ping the right way 2016-11-18 11:54:05 -08:00
a417b824f1 Added synchronization 2016-11-18 11:09:07 -08:00
e58450b5d3 Keepalive client-side implementation 2016-11-17 17:50:52 -08:00
b13ef79499 add more comments to metadata Fromcontext (#986) 2016-11-16 17:42:18 -08:00
8551858757 Grpclb: Support server list expiration (#962)
grpclb: Support server list expiration
2016-11-16 15:26:18 -08:00
941cc894ce Merge pull request #985 from menghanl/temporary_dialer_error
add FailOnNonTempDialError
2016-11-15 12:54:09 -08:00
dd61a2fa33 fix golint 2016-11-15 11:25:52 -08:00
c31bccc236 add FailOnNonTempDialError to control if gRPC should fail on non-temp dial error 2016-11-15 11:14:07 -08:00
0d9891286a Merge pull request #967 from ncteisen/advanced_go_interop_tests
Go Advanced Interop Tests
2016-11-11 13:29:59 -08:00
e59af7a0a8 Merge pull request #982 from menghanl/stats_test_fix
fix flaky stats test
2016-11-10 17:56:15 -08:00
524f421370 fix flaky stats test and reuse functions in stats test 2016-11-10 17:42:52 -08:00
2769b6cafd Fix comments from github 2016-11-10 16:50:37 -08:00
e05ccd7235 Merge pull request #974 from menghanl/temporary_dialer_error
return non temporary connection error if dialer returns non temprary …
2016-11-10 16:33:00 -08:00
3018da5a38 Merge pull request #981 from apolcyn/update_go_readme
add note in readme pre-req section to get the latest go version
2016-11-10 16:29:31 -08:00
df5d48b597 fix comments 2016-11-09 17:35:47 -08:00
947e436ef4 return non temporary connection error if dialer returns non temprary errors 2016-11-09 17:25:46 -08:00
fd15d531ba add note in readme pre-req section to get the latest go version 2016-11-09 16:50:30 -08:00
c0989007a1 Merge pull request #961 from menghanl/add_stats_package
Add package stats, and export stats.
2016-11-09 15:24:04 -08:00
88bdb9565f fixes in test 2016-11-09 14:04:51 -08:00
f511c49a58 remove Stream.TraceContext 2016-11-08 22:42:42 -08:00
f80f54e4d9 fix failing tests 2016-11-08 21:22:07 -08:00
6445dedfbc fix wrong context when handling stats 2016-11-08 18:17:14 -08:00
183e5e98ab fix comments in stats testing 2016-11-08 16:48:49 -08:00
11b929beff remove wrong comments from stats testing proto 2016-11-08 15:36:01 -08:00
0b062e4d80 cache conn LocalAddr and RemoteAddr 2016-11-08 13:37:25 -08:00