2419 Commits

Author SHA1 Message Date
526ef32890 Rename packages for grpclb messages/service to match directory name 2017-08-25 14:34:15 -07:00
fa59b779e8 Remove unnecessary function handleStreamSuspension (#1468) 2017-08-25 13:51:53 -07:00
e98913eca1 fix grpclb protos to not cause re-registration of types (#1466) 2017-08-25 13:32:10 -07:00
0b4b292f3a transport: fix handling of InTapHandle's returned context (#1461) 2017-08-25 13:18:45 -07:00
8336807293 the cancel function should be called to avoid ctx leak (#1465) 2017-08-25 13:10:07 -07:00
051e7013db add comment (#1464) 2017-08-25 13:09:52 -07:00
01089b2972 Remove buf copy when the compressor exist (#1427) 2017-08-25 12:26:38 -07:00
c29d6389e6 transport: Fix deadlock in client keepalive. (#1460)
When gRPC keepalives are enabled (which isn't the case by default at
this time) and PermitWithoutStream is false (the default), the client
can deadlock when transitioning between having no active stream and
having one active stream.  Subsequent attempts to create a new stream
or to close the client will hang on the transport's mutex, while the
keepalive goroutine is waiting indefinitely on a channel while holding
the transport's mutex.

This fixes #1459.
2017-08-25 11:18:52 -07:00
7db1564ba1 benchmark: add benchmain/main.go to run benchmark with flag set (#1352) 2017-08-24 10:08:43 -07:00
69abda08b5 stats: add methods to allow setting grpc-trace-bin and grpc-tags-bin headers (#1404)
This is in preparation for preventing any user-supplied metadata starting with "grpc-", which is reserved.

* stats: add methods to allow setting grpc-trace-bin and grpc-tags-bin headers

Pick these up in grpc's transport when sending and fill them when receiving.

* Add tags/trace to metadata and tests for that behavior

This is temporary to maintain compatibility and provide a migration strategy.
2017-08-24 10:00:40 -07:00
9b6ac7ddb7 deduplicate dns record in lookup (#1454)
deduplicate dns record in lookup
2017-08-23 13:45:01 -07:00
25d6e52b68 Add -u to installation command (#1451) 2017-08-23 10:39:14 -07:00
2308131c44 addrConn: change address to slice of address (#1376)
* addrConn: change address to slice of address
* add pickfirst balancer to test new addrconn
2017-08-21 12:27:04 -07:00
25b4a426b4 go-generate pb.go files and check in Travis to make sure they don't change (#1426) 2017-08-17 16:00:51 -07:00
5d9b09e422 Fix host string passed to PerRPCCredentials (#1433) 2017-08-17 15:59:03 -07:00
596a6acc87 metadata: Remove NewContext and FromContext for gRFC L7 (#1392) 2017-08-17 13:10:28 -07:00
bfaf042346 Add status details support to server HTTP handler (#1438) 2017-08-15 10:45:05 -07:00
1308414496 put *gzip.Writer back to pool (#1441) 2017-08-14 15:23:10 -07:00
9d99afc2fd Automatic WriteStatus for RecvMsg/SendMsg error on server side (#1409)
automatically WriteStatus if there's any error when RecvMsg/SendMsg on server side.
2017-08-14 12:24:23 -07:00
43d1787a0c Update ServerInHandle comments (#1437)
* Update ServerInHandle comments

* Include code string not code number for RST_STREAM
2017-08-14 10:05:02 -07:00
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