2020 Commits

Author SHA1 Message Date
b47cbd158b Use proto import from google.golang.org instead of github.com (#1176) 2017-04-10 10:15:59 -07:00
9090ef91c3 Merge pull request #1173 from lyuxuan/fix_status_return
add error handling for InvalidArgument error from sendResponse()
2017-04-07 16:26:28 -07:00
0c1d39df28 Separate incoming and outgoing metadata in context
This will prevent the incoming RPCs' metadata from appearing in outgoing RPCs
unless it is explicitly copied, e.g.:

incomingMD, ok := metadata.FromContext(ctx)
if ok {
  ctx = metadata.NewContext(ctx, incomingMD)
}

Fixes #1148
2017-04-07 11:54:56 -07:00
087f3d6e02 transport: implement GoString on Stream (#1167)
So context.String() won't  race when printing %#v.

It is not thread-safe to call context.String() on any context with a
stream value since valueCtx will use %#v to access all of the Stream
fields without holding a lock. Instead, print the Stream's pointer and
method for its GoString.
2017-04-07 11:16:52 -07:00
74a632af0e fix comments 2017-04-06 17:28:41 -07:00
aad28b3c55 add error handling for InvalidArgument error from sendResponse() 2017-04-06 14:40:53 -07:00
9f9c190692 Fix typo in interceptor.go (#1172) 2017-04-06 13:50:23 -07:00
1d27587e10 Change status package to deal with concrete types instead of interfaces (#1171) 2017-04-06 11:41:07 -07:00
b507112439 Add status package for reporting gRPC status and errors (#1156)
When an error implemented by the status package is returned from a service
handler, the server will transmit a rich status message in the
"grpc-status-details-bin" trailing metadata field if any detailed data is
attached to the error.  Client-side, we will decode them if present in the
server's response and return them to the user code performing the RPC.

This is backward compatible with the existing errors supported by the grpc
package.  However, the grpc.Errorf, grpc.Code and grpc.ErrorDesc functions for
managing errors are now deprecated; status.Errorf and status.Status type
asserions should be used instead.
2017-04-05 10:35:40 -07:00
f45e6e3b30 Bug fix(Issue#1141): Check if peer is nil before trying to derefer it. (#1143) 2017-04-04 15:08:14 -07:00
ee8ed34bcf get more metrics from go benchmark servers (#913)
* add user and system cpu usage to go benchmarks

* fix import and style issues

* sample elapsed time diffs after merging histograms

* style fixes and variables renames

* add pprof server to benchmark workers to grab different profile stats

* rename variables for consistency and default to no pprof
2017-04-03 15:53:03 -07:00
b982c1caa6 Behavior change: do not strip out gRPC user-agent (#1158) 2017-04-03 12:31:31 -07:00
b2fae0cf40 Implementation for server enforcement of keepalive policy. (#1147)
Implementation of server enforcement of keepalive policy.
Server will close connection with a client that violates this policy.
Policy parameters:
 - MinTime is the minimum amount of time a client should wait before sending a keepalive ping.
 - If PermitWithoutStream true, server expects keepalive pings even when there are no active streams(RPCs).
2017-03-31 11:37:51 -07:00
7fc29d0caa populate initReq target name and fix IP []byte type in grpclb (#1145) 2017-03-28 12:10:54 -07:00
b3cc2b5eca pick a random address if the current in use is deleted by resolver (#1135) 2017-03-28 11:13:46 -07:00
ccdf270424 add document to ClientHandshake about returning temporary error (#1125) 2017-03-28 11:12:50 -07:00
0df08a7a03 :authority should include port number (#1123) 2017-03-28 11:09:23 -07:00
14a6be430b Add grpc.Version string and use it in the UA (#1144) 2017-03-24 11:29:02 -07:00
0a20758157 remove support for go1.5 (#1132) 2017-03-23 20:52:49 -07:00
c3df40279c Support max age(#1119)
The new logic added to the server does the following:
- Gracefully closes an idle connection after a duration of keepalive.MaxConnectionIdle.
- Gracefully closes any connection after a duration of keepalive.MaxConnectionAge.
- Forcibly closes a connection after an additive period of keepalive.MaxConnectionAgeGrace over keepalive.MaxConnectionAge.
- Makes sure a connection is alive by sending pings with a frequency of keepalive.Time and closes a non-resposive connection after an additional duration of keepalive.Timeout.
2017-03-23 10:49:38 -07:00
d9541d7591 post-review commit. 2017-03-22 15:24:17 -07:00
9d8d0c6e0a Update test to work according to changes made to maxStreams behavior. (#1137) 2017-03-22 13:52:10 -07:00
50fcb6ab90 post review update 2017-03-21 17:33:03 -07:00
f1ab3d93d2 Post review update 2017-03-21 16:30:45 -07:00
c5a5dbc500 Don't return an error from dial if the balancer returns no initial servers (#1112)
This modifies the WithBlock behavior somewhat to block until there is at least
one valid connection.  Previously, each connection would be made serially until
all had completed successfully, with any errors returned to the caller.  Errors
are now only returned due to connecting to a backend if a balancer is not used,
or if there is an error starting the balancer itself.

Fixes #976
2017-03-21 11:35:53 -07:00
3c9df8ef7b Post review updates 2017-03-20 15:28:47 -07:00
cdee119ee2 Merge pull request #1124 from MakMukhi/rst_stream_issue
Upon observing timeout on rpc context, the client should send a RST_S…
2017-03-14 15:44:13 -07:00
553538425b Removing unnecessary change to http2_server 2017-03-13 18:07:08 -07:00
6b28425a45 Upon observing timeout on rpc context, the client should send a RST_STREAM to the server before freeing the quota for more rpcs to be created. 2017-03-13 17:09:45 -07:00
0713829b98 Merge pull request #1108 from MakMukhi/linter_update
golint update
2017-03-13 11:14:51 -07:00
82fb96a360 Rest of the implementation 2017-03-10 17:30:46 -08:00
e5a289ced7 MaxConnectionIdle implementation. More to follow 2017-03-10 11:56:02 -08:00
d50cf2db16 Merge pull request #1117 from MakMukhi/client_max_msg_size
Client should have a check on maximum size of received message size.
2017-03-10 11:14:43 -08:00
659f981255 more initial commits 2017-03-09 20:03:59 -08:00
0e71619115 making client consistent with server 2017-03-09 17:48:37 -08:00
1bf38b6a40 initial commit 2017-03-09 17:46:47 -08:00
b9b6d48985 test debug 2017-03-09 17:01:46 -08:00
a94b0948a3 Client should have a check on maximum size of received message size. 2017-03-09 16:58:23 -08:00
d9b58b5ce9 Initial commit 2017-03-09 15:33:28 -08:00
5ebdd304ba lint update and test fix 2017-03-08 11:35:54 -08:00
0d5b22c2a7 golint update 2017-03-07 18:12:58 -08:00
4eaacfed97 Merge pull request #993 from MakMukhi/mmukhi_keepalive_client
Point-to-point health check. Client side implementation
2017-03-06 16:54:00 -08:00
7b399ed358 Merge pull request #1076 from apolcyn/account_for_padding
account for padding in flow control, when received frame uses it
2017-03-06 13:37:14 -08:00
661dbbc817 conflict resolve 2017-03-06 13:19:09 -08:00
9d23576618 post-review update 2017-03-06 13:08:23 -08:00
0e5ab0098f Merge pull request #1106 from dfawley/cc_cancel
Add comment explaining why cancel is not called in success path after client transport is created
2017-03-06 12:00:49 -08:00
77204bfdf2 Add comment explaining why cancel is not called in success path after client transport is created 2017-03-03 16:46:26 -08:00
1dab933725 Merge pull request #1103 from menghanl/test_string_error
remove string comparing in test because text of an error string chang…
2017-03-02 18:05:54 -08:00
25f14b7f84 post-review updates 2017-03-02 18:00:55 -08:00
ba23d25e3a relax the checking on error string 2017-03-02 15:21:41 -08:00