Commit Graph

2729 Commits

Author SHA1 Message Date
lyuxuan eb55fa50e6
resolverWrapper: remove the watcher goroutine (#2446) 2018-11-09 15:31:07 -08:00
Doug Fawley a612bb6847
client: block RPCs early until the resolver has returned addresses (#2409)
This allows the initial RPC(s) an opportunity to apply settings from the service config; without this change we would still block, but only after observing the current service config settings.
2018-11-09 13:53:47 -08:00
Menghan Li 12ed5d0f69
internal: split health proto package import in test (#2445) 2018-11-07 10:31:21 -08:00
Menghan Li c94cef3891
internal: split proto package import in health package (#2442) 2018-11-06 09:59:22 -08:00
Michael Raimondi d27440de3f client: set TCP_USER_TIMEOUT socket option for linux (#2307)
Implements proposal A18 (https://github.com/grpc/proposal/blob/master/A18-tcp-user-timeout.md).

gRPC Core issue for reference: https://github.com/grpc/grpc/issues/15889
2018-11-05 15:13:34 -08:00
Can Guler 1b89e78fdf
test: Adds end2end tests for the case that Watch method returns unimplemented. (#2429)
Adds end2end tests for the case where Watch method is Unimplemented.
2018-11-05 14:24:11 -08:00
Doug Fawley 8f2842d4f0
client: in UpdateBalancerState, update picker before connectivity state (#2431)
In very rare cases, we could start an RPC before the picker had been updated to
one that would return a valid SubConn.  This is not a problem as the new picker
will be called again as soon as it is updated, but it can lead to test flakes
that depend upon the picker not being called before being ready.
2018-11-02 10:27:41 -07:00
Menghan Li 761a6b364c
binarylog: fix end2end test race (#2433) 2018-11-02 10:18:47 -07:00
Doug Fawley 59a2cfbdf9
Remove support for Go1.6-1.8 (#2428) 2018-11-01 15:43:42 -07:00
Menghan Li 36ef35ddb6
internal: add doc to tlsConn wrapper for channelz (#2421) 2018-11-01 14:31:51 -07:00
Menghan Li 0efb1e105d
binarylog: no warning if no config string is set (is empty string) (#2430) 2018-11-01 14:31:10 -07:00
Jean de Klerk 61c3ec866d
docs: clarify SendMsg/CloseSend usage (#2418) 2018-11-01 12:29:53 -06:00
lyuxuan 105f61423e
health: Client LB channel health checking (#2387) 2018-11-01 10:49:35 -07:00
Menghan Li f4273b1bc8
binarylog: fix racy TestClientBinaryLogCancel (#2423) 2018-11-01 10:20:23 -07:00
Doug Fawley 5a500ee73f
travis: remove Go 1.6 and 1.8 tests (#2415) 2018-11-01 08:50:05 -07:00
Can Guler 7271c8bb04
Fixes a broken test case. (#2425) 2018-10-31 16:29:11 -07:00
Can Guler c86bc5cd5f
health: Checks if the service's serving status has changed before sending an update (#2424) 2018-10-31 15:45:18 -07:00
Jean de Klerk 6572a802a1
internal: update golint to use new url (#2393) 2018-10-31 14:39:18 -06:00
Menghan Li 3332afdfad
internal: binarylog test replace += 1 with ++ (#2420) 2018-10-31 13:34:00 -07:00
Menghan Li 24638f5984
binarylog: call binary log in Client and Server (#2388)
Also includes:
 - Export `NewLoggerFromConfigString` so it can be also used when config string is specified in another way (e.g. command line flag)
 - Export `Logger` so user can install custom sink
 - Add temp file sink implementation
2018-10-31 10:21:20 -07:00
Doug Fawley a88340f3c8 internal: add testutils package comment (#2414) 2018-10-30 16:29:06 -07:00
Menghan Li c4d3b2fa07
channelz: register sockets with meaningful refnames (#2416) 2018-10-30 16:28:48 -07:00
Can Guler ec76f14f6f
health: Merges healthcheck package to health package. (#2417) 2018-10-30 16:08:45 -07:00
Doug Fawley 582d1c9bbf
healthcheck: add package comment (#2413) 2018-10-30 10:19:40 -07:00
lyuxuan aaaaffa63b
channelz: data race fix (#2411) 2018-10-29 17:54:21 -07:00
Can Guler 0430365f23
channelz: update generated proto stubs 2018-10-29 16:33:56 -07:00
Doug Fawley f86585f6f5
channelz: update generated proto stubs (#2408) 2018-10-29 10:24:39 -07:00
Doug Fawley 1b1c45ef21
internal: vet cleanups (#2405)
- Take advantage of `grep`'s status code, where possible
- Make the appengine check in vet.go exit with non-zero status if an error is encountered
- Add "fail_on_output" for the `tee|read` that we do when the status code cannot be used, to make it clear what it's for
- Document all our various checks
2018-10-26 15:50:46 -07:00
Can Guler e16607685d
healthcheck: clientHealthCheck and its unit test (#2389)
Adds clientHealthCheck and a unit test for exponential backoff functionality.
2018-10-26 13:00:42 -07:00
Menghan Li 425c07e59b internal: add check for import of ptypes proto packages (#2396) 2018-10-26 09:40:02 -07:00
Menghan Li ecb5db9eb3
channelz: returns sockets after startID in GetServerSockets() (#2401) 2018-10-25 16:39:43 -07:00
Menghan Li d7518259e0 Change version to 1.17.0-dev (#2399) 2018-10-23 11:07:38 -07:00
Jean de Klerk e120c3f900
internal: transport nil should happen before backoff (#2392)
Seems to fix https://travis-ci.org/grpc/grpc-go/jobs/443409852, but regardless
it's a more correct place for it to happen.
2018-10-22 13:57:57 -07:00
Menghan Li 93a2ad2c87 internal: rename proto imports to pb (#2395) 2018-10-22 13:55:52 -07:00
Jean de Klerk ff2aa05958
internal: fix GO_AWAY deadlock (#2391)
internal: fix GO_AWAY deadlock

A deadlock can occur when a GO_AWAY is followed by a connection closure. This
happens because onClose needlessly closes the current ac.transport: if a
GO_AWAY already occured, and the transport was already reset, then the later
closure (of the original address) sets ac.transport - which is now healthy -
to nil.

The manifestation of this problem is that picker_wrapper spins forever trying
to use a READY connection whose ac.transport is nil.
2018-10-19 14:11:21 -07:00
Menghan Li 39444b99c0
binarylog: implement methodlogger (#2334)
Method logger will be picked by each RPC at the beginning to log binary entries. It also handles truncating.

This PR also adds script to download proto from grpc/grpc-proto
2018-10-18 17:27:11 -07:00
Doug Fawley 0ee1544089
cleanup: remove ac.events (unused) and related dead code (#2385) 2018-10-18 16:29:41 -07:00
Menghan Li 13b2b26aae internal: update proto generated code (#2386) 2018-10-18 15:45:22 -07:00
Jean de Klerk 04c0c4d299
internal: fix client send preface problems (#2380)
internal: fix client send preface problems

This CL fixes three problems:

- In clientconn_state_transitions_test.go, sometimes tests would flake because there's not enough buffer to send client side settings, causing the connection to unpredictably enter TRANSIENT FAILURE. Each time we set up a server to send SETTINGS, we should also set up the server to read. This allows the client to successfully send its SETTINGS, unflaking the test.

- In clientconn.go, we incorrectly transitioned into TRANSIENT FAILURE when creating an http2client returned an error. This should be handled in the outer resetTransport main reset loop. The reason this became a problem is that the outer resetTransport has very specific conditions around when to transition into TRANSIENT FAILURE that the egregious transition did not have. So, it could transition into TRANSIENT FAILURE after failing to dial, even if it was trying to connect to a non-final address in the list of addresses.

- In clientconn.go, we incorrectly stay in CONNECTING after `createTransport` when a server sends its connection preface but the client is not able to send its connection preface. This CL causes the addrconn to correctly enter TRANSIENT FAILURE when `createTransport` fails, even if a server preface was received. It does so by making ac.successfulHandshake to consider both server preface received as well as client preface sent.
2018-10-18 14:31:34 -07:00
Menghan Li 481c28e8d4
documentation: add proxy doc (#2357) 2018-10-18 13:09:24 -07:00
Menghan Li 491af2b0a4
grpclb: downgrade error logs to warning (#2381)
Warning is more appropriate per: https://github.com/grpc/grpc-go/blob/master/Documentation/log_levels.md#warning
2018-10-17 14:44:02 -07:00
Can Guler 23d111fa0d
Health server watch method (#2365)
Implements the Watch method of Health server and it's end2end tests.
2018-10-16 14:39:16 -07:00
Doug Fawley cfb9600851
server: fix handling of RPC timeouts that overflow int64 nanos (#2379)
Fixes #2374
2018-10-16 13:34:53 -07:00
lyuxuan 557b6b5f68
healthcheck: client-side internal hook (#2378) 2018-10-15 17:57:20 -07:00
Andrew Seigner 1da8e51941 transport: http2Client sends RST_STREAM (#2354)
If http2Client receives END_STREAM before it sends END_STREAM, it will send RST_STREAM to fully closed the stream.
2018-10-15 14:28:12 -07:00
Menghan Li f1b28afd42
doc: add faq for logging and "transport is closing" error (#2372) 2018-10-15 13:28:48 -07:00
Menghan Li dfaadfecca
server: handleStream() cleanup (#2352) 2018-10-15 13:27:22 -07:00
Doug Fawley 371811880c
balancer: add clarifying note to PickOptions.Header (#2377) 2018-10-15 10:27:54 -07:00
Doug Fawley 5b2c343e0b
add header metadata to PickOptions (#2376) 2018-10-12 15:44:20 -07:00
Jean de Klerk 1ca9df53a7
internal: clean up and unflake state transitions test (#2366)
internal: clean up and unflake state transitions test

Switches state transitions test to using a notification from a custom load
balancer, instead of relying on waiting for laggy balancer state updates.

Also generally adds more coverage around state transitions and a framework
for easily adding more of these kinds of tests.

Fixes #2348
2018-10-12 15:22:27 -07:00