2117 Commits

Author SHA1 Message Date
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
9bf8ea0a82 clientconn, server: replace time.After with time.NewTimer (#998)
When timeout is not hit `time.After` will leak unnecessary timer, so
it's better to stop timer explicitly.

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
2017-05-19 15:57:10 -07:00
c7379be7b6 grpclb balancer.Close() should not panic if called more than once (#1250) 2017-05-19 15:44:37 -07:00
27ae1472a3 remove some todo comments 2017-05-19 14:55:35 -07:00
074dbfbc52 Add doc and example for mocking streaming RPCs (#1230)
* Example code for mocking streams
* Added another expectation on the stream
* Documentation for mocking streaming RPCs
2017-05-19 13:36:45 -07:00
ed64d51c18 remove unnecessary ok 2017-05-19 11:52:09 -07:00
d19bbe846e change max message size functions name 2017-05-19 11:08:40 -07:00
504db8e582 merge master 2017-05-18 14:52:35 -07:00
11d93ecdb9 Test for EmptyCallOption 2017-05-17 14:47:38 -07:00
ce595b8452 Implement EmptyCallOption 2017-05-17 14:47:38 -07:00
3419b42955 Reuse Token for serviceAccount credentials (#1238) 2017-05-16 12:37:36 -07:00
3773797869 Travis: add staticcheck (#1019)
Also only run golint and go vet in Go 1.8, and fix some vet failures.
2017-05-15 17:05:27 -07:00
7505481848 comments added 2017-05-15 15:13:53 -07:00
4d2b4b5c51 fix minor typo 2017-05-15 14:36:20 -07:00
e2f22b027b Defined GA and add pointer to benchmarks (#1239) 2017-05-15 14:12:16 -07:00
35d77ea991 merge master, resolve conflicts 2017-05-15 13:54:22 -07:00
bdf9a640e4 add timeout test, add check or pointer filed in callOption, fix minor issues 2017-05-15 13:51:11 -07:00
aacd01c219 call listen with "localhost:port" instead of ":port" in tests (#1237) 2017-05-15 12:43:49 -07:00
135247d85c fix server panic trying to send on stream as client disconnects #1111 (#1115) 2017-05-15 12:41:55 -07:00
1c69e4cae0 Eagerly set a pointer to nil to help GC (#1232) 2017-05-12 14:06:10 -07:00
780308da60 add logs to grpclb on send and recv (#1235) 2017-05-12 14:05:32 -07:00
a0c3e72252 Add stats test for client streaming and server streaming RPCs (#1140) 2017-05-11 11:58:13 -07:00
88a73d35c9 Adding dial options for PerRPCCredentials (#1225)
* Adding dial options for PerRPCCredentials

* Added tests for PerRPCCredentials

* Post-review updates

* post-review updates
2017-05-11 11:07:38 -07:00
07bd9434fa Pass custom dialer to balancer (#1205)
* Pass custom dialer to balancer
* add test for passing custom dialer
* add grpclb package comment
2017-05-11 10:10:19 -07:00
3dd14ccc71 Http status to grpc status conversion (#1195) 2017-05-11 09:40:46 -07:00
17760cfd5b Calling handleRPC with context derived from the original (#1227)
* Calling handleRPC with different context derived from the original context
* change comment for tagRPC and stats fields
2017-05-10 17:54:49 -07:00
600406e696 Use pooled gzip.{Writer,Reader} in gzip{Compressor,Decompressor} (#1217)
This change saves a lot of memory by reusing the underlying
gzip.{Writer,Reader}, which allocates up to 1.4mb at every instanciation
according to [1]. This was fixed by adding a Reset method by to the
object at [2].

The amount of memory (and GC time) saved is pretty high, as reported by
pprof:

      flat  flat%   sum%        cum   cum%
   28.33GB 85.70% 85.70%    32.74GB 99.05%  compress/flate.NewWriter

      flat  flat%   sum%        cum   cum%
   19.39MB 16.74% 16.74%    22.07MB 19.05%  compress/flate.NewWriter

And the benchmarks:

benchmark                           old ns/op     new ns/op     delta
BenchmarkGZIPCompressor1B-4         215170        22291         -89.64%
BenchmarkGZIPCompressor1KiB-4       225971        27213         -87.96%
BenchmarkGZIPCompressor8KiB-4       246696        54785         -77.79%
BenchmarkGZIPCompressor64KiB-4      444851        286924        -35.50%
BenchmarkGZIPCompressor512KiB-4     2279043       2115863       -7.16%
BenchmarkGZIPCompressor1MiB-4       4412989       4258635       -3.50%

benchmark                           old allocs     new allocs     delta
BenchmarkGZIPCompressor1B-4         17             0              -100.00%
BenchmarkGZIPCompressor1KiB-4       17             0              -100.00%
BenchmarkGZIPCompressor8KiB-4       17             0              -100.00%
BenchmarkGZIPCompressor64KiB-4      17             0              -100.00%
BenchmarkGZIPCompressor512KiB-4     17             0              -100.00%
BenchmarkGZIPCompressor1MiB-4       17             0              -100.00%

benchmark                           old bytes     new bytes     delta
BenchmarkGZIPCompressor1B-4         813872        8             -100.00%
BenchmarkGZIPCompressor1KiB-4       813872        16            -100.00%
BenchmarkGZIPCompressor8KiB-4       813875        27            -100.00%
BenchmarkGZIPCompressor64KiB-4      813918        190           -99.98%
BenchmarkGZIPCompressor512KiB-4     814928        1871          -99.77%
BenchmarkGZIPCompressor1MiB-4       820889        9735          -98.81%

[1] https://github.com/golang/go/issues/6138
[2] db12f9d4e4

Signed-off-by: Steeve Morin <steeve.morin@gmail.com>
2017-05-10 16:40:25 -07:00
4013f8d559 tentative fix to a flow control over-give-back bug (#1170) 2017-05-10 10:55:38 -07:00
59426b3c05 gofmt 2017-05-08 00:22:57 +00:00
d9265441de remove unessary nil in return statement 2017-05-08 00:17:01 +00:00
3ea287058c Merge branch 'master' into service_config_pr 2017-05-07 16:49:32 -07:00
ffa4ec7da2 Ensure that RoundRobin.Close() does not panic. (#1139) 2017-05-05 13:59:00 -07:00
2eb11e102d Log the actual error when inTapHandle fails in http2Server (#1185) 2017-05-05 13:40:31 -07:00