73 Commits

Author SHA1 Message Date
487ada6517 Fixed typos in docstrings 2016-06-07 12:01:07 +01:00
0b1df3bca2 add BalancerGetOption 2016-05-24 17:19:44 -07:00
aa532d5baf Fix some issues and remove garbbage files 2016-05-16 15:31:00 -07:00
44373898ac Merge branch 'master' of https://github.com/grpc/grpc-go 2016-05-06 15:47:17 -07:00
9c2d8546bf load balancer 2016-05-06 15:47:09 -07:00
27ecb91efa Fix typo 2016-04-29 14:58:02 -07:00
61e92eacc3 Phase 1 to add the server interceptor 2016-04-18 16:18:34 -07:00
11ef22ebfb make comment on invoke/sendmsg more clear 2016-04-01 10:47:25 -07:00
a294a45ba0 Don't treat StatusDesc() as a format string.
For example, if the error message contains "%v", then passing
StatusDesc() as the format string to Errorf() will replace "%v" with
"%!v(MISSING)".
2016-03-19 17:15:21 -07:00
89f694edb4 Merge pull request #569 from bradfitz/error_map
Fix crashes where transports returned errors unhandled by the message parser
2016-02-24 18:22:25 -08:00
110fd99e30 Fix crashes where transports returned errors unhandled by the message parser.
The http.Handler-based transport body reader was returning error types
not understood by the recvMsg parser. See #557 for some background and
examples.

Fix the http.Handler transport and add tests. I copied in a subset of
the http2 package's serverTest type, adapted slightly to work with
grpc. In the process of adding tests, I discovered that
ErrUnexpectedEOF was also not handled by the regular server
transport. Document the rules and fix that crash as well.

Unrelated stuff in this CL:

* make tests listen on localhost:0 instead of :0, to avoid Mac firewall
  pop-up dialogs.

* rename parser.s field to parser.r, to be more idiomatic that it's an
  io.Reader and not anything fancier. (it's not acting like type
  stream, even if that's the typical concrete type)

* move 5 byte temp buffer into parser, rather than allocating it for
  each new message. (drop in the bucket improvement in garbage; more
  to do later)

* rename http2RSTErrConvTab to http2ErrConvTab, per Qi's earlier
  CL. Also add the HTTP/1.1-required error mapping for completeness,
  not that it should ever arise with gRPC, also per Qi's earlier CL
  referenced in #557.
2016-02-24 15:09:17 -08:00
5085c7628d Always close tracing when a stream goes wrong 2016-02-22 18:02:10 -08:00
10e70583f7 Fix typo. 2016-02-12 15:19:47 +11:00
af8888dc8d remove Compressor/DecompressorGenerator 2016-01-29 14:38:20 -08:00
6d87263bd5 add test 2016-01-27 18:34:24 -08:00
086f6de8a8 force flush headers frame for server streaming and bi-di streaming 2016-01-27 16:39:34 -08:00
4258b32de7 Don't create buffer if compressor is nil 2016-01-25 11:47:04 -08:00
da3bb0c9f7 Support compression 2016-01-22 18:21:41 -08:00
8e76d451dd Add missing trace finish on an uncommon code path 2016-01-14 17:01:22 -08:00
7172d5c7a6 Still show trace for the client streams which failed to create 2016-01-14 14:53:07 -08:00
59c74732bb Don't trace when failing to create a cleint stream 2016-01-14 14:38:45 -08:00
47fc4a2936 Specialize connection error handling to avoid goroutine leaking in some cases 2016-01-14 12:24:00 -08:00
7aa428f5d6 Finish trace for premature error 2015-11-30 16:41:52 -08:00
afca514667 Improve rpc cancellation when there is no pending I/O 2015-10-22 13:07:13 -07:00
390cd42894 revise Picker API 2015-10-08 11:05:59 -07:00
ec8414396c bug fix: stop busy wait on new transport 2015-10-08 09:09:06 -07:00
492a718373 fix comments 2015-10-05 18:02:06 -07:00
9db3ca85c7 gofmt -w 2015-10-05 17:52:00 -07:00
bc49d12737 refactor servier side trace again 2015-10-05 17:49:53 -07:00
b4aa9eae10 fix methodFamily breakage 2015-10-02 15:38:37 -07:00
59258581ef remove temp changes 2015-10-02 15:14:27 -07:00
d84ff12005 trace refactoring 2015-10-01 17:24:39 -07:00
f3de7c238c Merge pull request #369 from iamqizhao/master
refactor the interaction between ClientConn and Picker
2015-09-29 10:32:02 -07:00
c01ea6e359 revise Picker API 2015-09-29 10:24:03 -07:00
e07e93b00e Merge pull request #358 from Sajmani/work
grpc: make trace.FromContext work, and record handler status in traces
2015-09-28 23:29:59 -07:00
ec99a32572 redesign the API 2015-09-25 13:21:25 -07:00
ee98c48bb4 Incorporate dsymonds' comments.
Fix another bug: cancel the Context provided to an RPC server handler
as soon as that handler returns, so that goroutines started by that
handler can detect that the handler is done and exit. Without this
fix, goroutines started by a handler will keep running, unless the
handler itself arranges to cancel the context.
2015-09-23 22:17:37 -04:00
9afcd0c697 preliminary refactoring for custom naming and load balancing 2015-09-23 19:09:37 -07:00
b6c9c5a70f grpc: record the description of the status returned by server RPC
handlers in request traces, and mark the trace as an error if the
status is not OK.

Install the trace into the Context passed to server handlers using
trace.NewContext, so that code in the server handlers can annotate the
trace using trace.FromContext.
2015-09-23 17:07:35 -04:00
dd992b3748 remove transportSeq 2015-09-21 18:17:49 -07:00
18c359f6a9 grpc: rename request trace family from "Sent" to "grpc.Sent". 2015-08-09 23:01:01 -04:00
0231ff14bc remove duplicate check 2015-07-28 18:11:22 -07:00
d90cbe84e6 fix trace set error bugs 2015-07-28 17:18:35 -07:00
3616d6be54 fix trace setError 2015-07-28 15:27:46 -07:00
a3dce46030 making trace as an error when error occurs and fix the format 2015-07-28 10:13:40 -07:00
845510e440 add server side tracing 2015-07-27 14:33:17 -07:00
e79ac3cb4b remove duplicate nil check separate var 2015-07-24 16:36:12 -07:00
be4cb2a81a relocate response log 2015-07-24 15:39:25 -07:00
6cfd2022af add a bool in payload struct 2015-07-24 11:30:14 -07:00
bd20726bd8 add client streaming response trace 2015-07-23 18:14:52 -07:00