2349 Commits

Author SHA1 Message Date
7657092a13 Server should send 2 goaway messages to gracefully shutdown the connection. (#1403)
* First commit.

* Basic implementation

* Server should send two GoAways to gracefully shutdown the connection.

* mend

* Post-review updates

* Fixed issue after rebase

* Fixing typo
2017-08-09 14:16:03 -07:00
e81b5698fd Add and use connectivity package for states (#1430)
* Add and use connectivity package
* Mark cc state APIs as experimental
2017-08-09 10:31:12 -07:00
73041be906 Add 'experimental' note to ServeHTTP godoc (#1429) 2017-08-08 08:58:35 -07:00
383b11435b Document Server.ServeHTTP (#1406)
Fixes #549
2017-08-07 13:10:34 -07:00
059280c96e Set peer before sending request (#1423) 2017-08-07 10:39:34 -07:00
963eb485d8 Fix missing and wrong license (#1422) 2017-08-04 13:46:18 -07:00
4e56696c6c Fix a goroutine leak in DialContext (#1424)
A leak happens when DialContext times out before a balancer returns any
addresses or before a successful connection is established.

The loop in ClientConn.lbWatcher breaks and doneChan never gets closed.
2017-08-04 13:40:50 -07:00
39c8c3866d Use NewOutgoingContext in the metadata doc (#1425)
Removed the deprecated `NewContext` from the doc so that the
documentation would match example given in the doc
2017-08-04 13:14:02 -07:00
53ae6b7e90 Fix typo 2017-08-03 16:08:13 -07:00
66c9ed803b Add flags for tls file path (#1419) 2017-08-03 15:23:02 -07:00
bba722ab6d Change comment on stats.End.Error (#1418) 2017-08-03 13:47:29 -07:00
b463cc3276 Call cancel on contexts in tests (#1412) 2017-08-02 10:43:35 -07:00
fa1cb32dc4 Don't use 64-bit integers with atomic. (#1411)
* Quick fix

* Dont use 64-bit ints
2017-07-31 17:31:24 -07:00
4c7bb72916 benchmark: don't stop timer until after workers are done (#1407) 2017-07-31 11:36:28 -07:00
7c7afa0318 Validate send quota again after acquiring writable channel (#1367)
* Validate send qouta again after acquring writable channel.

* Debug

* increase version only after settings have been updated

* clean-up
2017-07-31 10:56:36 -07:00
98bc2cec5b Use log instead of grpclog in routeguide example (#1395) 2017-07-31 10:40:59 -07:00
971efedc20 Revert "Make all "grpc-" metadata field names reserved (#1391)" (#1400)
This reverts commit 3ddcdc268d88595eb2f3721f7dc87970a6c3ab6e.
2017-07-28 11:04:27 -07:00
aa5b2f7368 Enabling client process multiple GoAways (#1393) 2017-07-28 09:37:53 -07:00
b31f0c6036 Assign testdata path to correct variable (#1397) 2017-07-27 16:02:51 -07:00
e64ff5d75c Do not call testdata.Path when defining flags (#1394) 2017-07-27 14:00:18 -07:00
3ddcdc268d Make all "grpc-" metadata field names reserved (#1391) 2017-07-26 10:50:56 -07:00
0c390d8eea remove defer funtion in recvBufferReader Read method (#1031) 2017-07-26 09:04:10 -07:00
ca9e0c3458 Add testdata package and unify testdata to only one dir (#1297) 2017-07-25 10:24:45 -07:00
a56843968d DNS resolver (#1300)
* initial dns resolver impl

* add srv lookup

* more srv

* change from string to Update

* added port handling

* a complete draft for dns resovler except the polling mechanism

* added sleep to infrequently poll the DNS server

* commented out test case since they are not portable

* remove duplicate declaration/definition in grpclb

* change namespace for grpclb structures

* goimports gofmt

* fix sorting issue

* implement sort.Interface

* different sort implementation for different go version

* add missing files

* fix missing comments

* handle err

* fix comments: unexport dnsResolver and dnsWatcher, add chan to exit Next(), add freq to control polling frequency

* enhance target string handling, add static IPWatcher, add mock test

* debug travis

* disable real address resolver test, since travis return 3 resolved IPs, 2 of them are duplicates

* shorten test time by reduce sleep time in TestIPWatcher, since it doesn't really do the DNS round trip

* resolve data race

* resolve data race using waitgroup

* reimplement setHostPort, compileUpdate, unexport ipWatcher

* delete sort related stuff, fix close bug for Next(), fix compileUpdate bug(change to map[Update]bool, plus fix minor review comments

* fix minor test case

* minor change to Next()

* use net.DefaultResolver with context as input

* add different build rules for lookupHost and lookupSRV

* minor fix

* go1.6 shall fail, but 1.7, 1.8 should pass

* go1.6 is expected to pass

* all go version should pass, added pre17 and 17 for replaceNetFunc to handle context problem

* rename test helper file name. should fix build problem

* goimports

* fix 1.7 context problem

* reformat dns_resolver_test structures

* change Next() behavior to have equal stalling interval between each lookup. Restructure dns_resolver_test.

* gofmt

* update go17_test.go, go18_test.go to reuse code. dns_resolver_test: check result and behavior correctness separately.

* update Next() logic
2017-07-24 17:17:45 -07:00
a5d184a8a1 Expose ConnectivityState of a ClientConn. (#1385) 2017-07-24 15:00:53 -07:00
cdc12d4a3c status: Add WithDetails and Details functions (#1358) 2017-07-24 14:42:24 -07:00
6495e8dfeb benchmark: remove multi-layer for loop (#1339) 2017-07-21 13:39:06 -07:00
0c41876308 transport: fix minor typo in http2_server.go (#1383)
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-21 10:58:12 -07:00
b34c88b087 Add doc in default implementation fatal functions on os.Exit() (#1365) 2017-07-21 09:39:31 -07:00
2bb3182589 Fix bufconn.Close to not be blocking. (#1377) 2017-07-20 14:09:45 -07:00
98eab9baf6 Do not create new addrConn when connection error happens (#1369) 2017-07-20 13:22:59 -07:00
2b21bfb96b Change version to 1.6.x (#1382) 2017-07-20 13:19:54 -07:00
939edc09d6 Revert "Use bufconn in end2end tests." (#1381)
This reverts commit c7e2c00ed1df1690ec11b9984b3fa8da1bfafbdd.

There is a race between Dial and Close that causes goroutine leaks in the
end2end tests.
2017-07-19 13:57:37 -07:00
71260d2171 Fix logging method (#1375) 2017-07-18 10:25:36 -07:00
c7e2c00ed1 Use bufconn in end2end tests. 2017-07-17 17:09:17 -07:00
9a71c7940b Create bufconn package for a local, buffered net.Conn and dialer/listener 2017-07-17 17:09:17 -07:00
ce03e9cc71 Fix a typo in examples/gotutorial.md (#1374) 2017-07-17 10:25:45 -07:00
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
27b2052c95 fix deadlock of roundrobin balancer (#1353) 2017-07-12 10:15:13 -07:00
8264d619d8 Ignore goroutines spanwned by log.init during leakcheck. (#1368) 2017-07-11 14:55:05 -07:00
86ec6baad9 Populate callInfo.peer object for streaming RPCs (#1356) 2017-07-11 13:56:13 -07:00
d69dedd8b7 BDP estimation and window update. (#1310) 2017-07-11 13:00:55 -07:00
93166a0b0b Canonicalize https://grpc.io as the preferred URL prefix 2017-07-10 16:28:39 -07:00
37be128ebf Update leckCheck to ignore non-gRPC goroutine introduced in Go1.9 (#1351) 2017-07-10 14:58:33 -07:00
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
9cb02b885b latency: sleep in Write when BDP is exceeded to avoid buffer bloat (#1330) 2017-06-26 16:20:44 -07:00
77d4a9f456 Add documentation to deprecate WithTimeout dial option (#1333) 2017-06-26 15:18:57 -07:00
eb7b130505 change objects in recvBuffer queue from interface to concrete type to reduce allocs (#1029) 2017-06-26 15:04:42 -07:00