3081 Commits

Author SHA1 Message Date
914c52b240 xds: eds balancer (#2624)
The balancer that handles eds response and does two level balancing (locality level and endpoint level).
2019-02-28 16:19:50 -08:00
cba9cfed64 xds Balancer: implementation (#2614) 2019-02-28 15:12:40 -08:00
9ecb6116ff grpclb: drop only when at least one SubConn is ready (#2630) 2019-02-28 13:11:23 -08:00
5878d965b2 transport: remove RequireHandshakeHybrid support (#2529)
This removes RequireHandshakeHybrid support and changes the default behavior
to RequireHandshakeOn. Dial calls will now block and wait for a successful
handshake before proceeding. Users relying on the old hybrid behavior (cmux
users) should consult https://github.com/soheilhy/cmux/issues/64.

Also, several tests have been updated to take this into consideration by
sending settings frames.
2019-02-27 11:04:46 -07:00
a51d23e017 transport: return ErrConnClosing for proper handling (#2644)
transport: return ErrConnClosing for proper handling
2019-02-27 09:36:25 -08:00
3aaef9f0c1 Change version to 1.20.0-dev (#2661) 2019-02-26 11:34:33 -08:00
40cb5618f4 dialOption: export WithContextDialer() (#2629)
fixes #2627
2019-02-25 15:22:10 -08:00
871b88ce2e doc: fix typos (#2655) 2019-02-25 10:31:22 -08:00
9c297a48bb examples: remove duplicated words (#2654) 2019-02-25 10:07:04 -08:00
2773c7bbcf Fix styling (#2647)
Fix styling
2019-02-21 16:37:37 -08:00
ed70822b12 keepalive: apply minimum ping time of 10s to client and 1s to server (#2642)
* keepalive: apply minimum ping time of 10s to client and 1s to server

* review fixes
2019-02-21 13:09:37 -08:00
ae7b4f21da examples: correct typo in keepalive example (#2645) 2019-02-21 13:09:24 -08:00
b86a9dbd22 documentation: Adds package level comments (#2612)
* ADDED package level comments for: benchmark/, examples/helloworld/

* UPDATED code to run gofmt

* FIXED linter errors

* FIXED spelling error

* FIXED documentation based on feedback

* FIXED comment to add pointer to another file

* ADDED reference to start server

* ADDED fix to include command to start server
2019-02-21 13:05:00 -08:00
587cec03e6 Moves swapState up, so it gets executed no matter what. (#2649)
* Moves swapState up, so it gets executed no matter what.

* Adds an explanation.
2019-02-20 18:03:46 -08:00
29c406a5bd examples: add keepalive example (#2637) 2019-02-14 16:58:00 -08:00
6d026ae45a internal: transport_test init expected byte slice to be not all zero (#2643) 2019-02-14 09:51:36 -08:00
1dbad57dad internal: delete an info log (#2640)
This log doesn't print much useful information, and causes flooding, especially when ClientConn is closed (one Shutdown log for each subconn).
2019-02-13 14:40:29 -08:00
32559e2175 internal: server deletes stream after receiving an RST_STREAM frame
* Fixes established streams leak in the loopy writer.

RSTStreamFrames used to be ignored by the server transport, if a trailer had already been put into the transport's control buffer. If loopy writer couldn't write anything into a stream because of an error on the client side, then this trailer would never be sent. At that point, server would receive an RSTStreamFrame from client. But this RSTStreamFrame would be ignored because a trailer was already put into the control buffer. This would keep the stream open and in memory on the server side.

With this change, a cleanupStream item is put into the transport's control buffer, whenever an RSTStreamFrame is received by the server, even after a trailer has been put into the buffer.

* When client sends a header to initiate a stream just after sending an RST_STREAM, server gets these frames in the correct order.
When server receives the RST_STREAM, it marks the stream as done and defers the deletion of the stream to the loopy writer by putting a cleanupStream item into control buffer.
Then the server receives the header to initiate a stream. It acts on the header immediately and attempts to create the stream. But because the old stream is not deleted, it hits the number of streams limit and fails.
This commit solves this problem by letting server handle the deletion immediately after receiving the RST_STREAM.

* Refactors deleteStream method.

* Moves consts declarations into test function's body.
2019-02-11 17:33:22 -08:00
a402911c6f internal: resetTransport connect deadline is across addresses (#2540)
internal: resetTransport connect deadline is across addresses

Currently, the connect deadline is recalculated per-address. This PR amends
that behavior such that all addresses for a single connection attempt share
the same deadline.

Fixes #2462
2019-02-11 17:12:42 -07:00
1263ed4d2e internal: add buffer for channelz flowcontrol getter channel (#2625)
to avoid goroutine leak
2019-02-11 10:31:17 -08:00
05de310f6e Fix typo s/banlacer/balancer/ (#2633)
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2019-02-11 09:46:38 -08:00
5d5c0ac4a3 internal: check flush err (#2632) 2019-02-08 16:17:16 -07:00
2259ee6f1a makefile: remove testappengine from make all (#2621)
Since it requires goapp.
2019-02-07 13:44:42 -08:00
01e57758bc grpc: limit reader with maxReceiveMessageSize (#2617)
fixes #2616
2019-02-07 13:32:00 -08:00
23ef1279c1 doc: fix broken link in auth doc (#2613) 2019-02-07 13:26:12 -08:00
f959f2e843 xds: balancer group (#2564)
balancerGroup takes a list of balancers, and make then into one balancer.

Updates from ClientConn are forwarded to sub-balancers
 - service config update
    - Not implemented currently
 - address update
 - subConn state change
    - find the corresponding balancer and forward

Actions from sub-balances are forwarded to parent ClientConn
 - new/remove SubConn
 - picker update and health states change
    - sub-pickers are grouped into a group-picker
    - aggregated connectivity state is the overall state of all pickers.
 - resolveNow
2019-02-07 11:20:30 -08:00
c2f12b83a7 Fix error formatting based on best practices from Code Review Comments (#2615) 2019-02-07 10:01:40 -08:00
d14ffaeb5c client: deprecate CallCustomCodec and provide new version using encoding.Codec (#2556) 2019-02-01 10:21:31 -08:00
1925e2441e client: don't allow io.EOF to be passed from balancer to user (#2604) 2019-01-30 16:28:11 -08:00
25e74d3f23 vet: use fail_on_output so user can see why git client is not porcelain (#2605) 2019-01-30 10:56:44 -08:00
8e6533ee6e client: clean up v1 balancer wrapper error handling (#2511) 2019-01-30 10:56:23 -08:00
eda3b7e3ed client: fix handling of GRPC_GO_REQUIRE_HANDSHAKE=on to not interpret as "hybrid" (#2603)
6cc789b34b made `envconfig.RequireHandshakeOn` the default when unspecified by environment variable, but missed a fallthrough leading to `GRPC_GO_REQUIRE_HANDSHAKE=on` specifying `envconfig.RequireHandshakeHybrid`.  This change adds the missing fallthrough.
2019-01-29 15:00:25 -08:00
17f2449821 Add google_default_credentials interop test case for go (#2600)
Implementing the [google default creds](https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#google_default_credentials) interop test for go.

This test case was added in https://github.com/grpc/grpc/pull/17213. The existing OAuth creds test cases turned out to not be great first for google default creds testing, so https://github.com/grpc/grpc/pull/17213 got rid of those tests and created a new dedicated test for google default creds. This PR does that and also gets rid of the now-unneeded (we thought they would be needed earlier) OAuth test scenarios with plain ALTS.
2019-01-29 11:49:49 -08:00
6086f8d68f examples: reflection (#2594) 2019-01-25 15:35:01 -08:00
6d855749cf travis: add Go 1.12beta2 to CI (#2598) 2019-01-25 13:07:43 -08:00
0e8a6f931c credentials: add TLS 1.3 cipher suites (#2596)
This lets the tests pass with Go1.12beta2.
2019-01-25 08:47:38 -08:00
9225666342 Modified binary search for the correct delay. (#2584)
* Binary search for the correct delay.

* Removes an unnecessary log line.

* Fixes.

* Switches back to linear search.

* Replaces cancel with a timeout.
2019-01-23 14:49:11 -08:00
e9c1ac35ec fix: typos (#2591) 2019-01-23 09:59:48 -08:00
4cad6a6283 comment: default MaxSendMsgSize should be math.MaxInt32 instead of 4MB (#2586) 2019-01-22 10:48:59 -08:00
ec9c18c8c6 internal: split StateRecordingBalancer in test to balancer and builder (#2578)
And instead of setting state notify channel in balancer, create a new notify
channel at Build.

fixes #2576
2019-01-18 10:21:46 -08:00
9f93218b13 cleanup: update staticcheck to version supporting modules and new checkers (#2583) 2019-01-17 16:27:42 -08:00
d7e8e3da0d cleanup: remove staticcheck exception (#2582) 2019-01-17 10:24:42 -08:00
9572bbe0f9 cleanup: remove unused symbols (#2581) 2019-01-17 10:14:45 -08:00
efaac52355 roundrobin: randomize starting address when rebuilding the picker (#2579) 2019-01-17 09:17:03 -08:00
59acad4c45 cleanup: more simplifications (#2574) 2019-01-16 13:07:56 -08:00
4e92c060da cleanup: replace unnecessary loops (#2573) 2019-01-16 13:06:58 -08:00
dfd7708d35 cleanup: use time.Until(t) instead of t.Sub(time.Now) (#2571) 2019-01-15 16:09:50 -08:00
38b35dcb7c cleanup: lower-case starting character of error strings (#2572) 2019-01-15 16:09:35 -08:00
a1ead1ef6c Change version to 1.19.0-dev (#2569) 2019-01-15 13:34:07 -08:00
6cc789b34b client: make handshake required 'on' by default, not 'hybrid' (#2565) 2019-01-15 09:19:32 -08:00