dfawley
826807ed07
change 'if x == true' to 'if x' ( #2289 )
2018-09-04 15:10:47 -07:00
lyuxuan
da7e20b83e
channelz: turn on channelz when importing service package, delete RegisterChannelz from grpc package ( #2277 )
2018-08-29 11:01:36 -07:00
dfawley
a344a35754
internal: remove TestingUseHandlerImpl ( #2253 )
2018-08-03 09:35:00 -07:00
lyuxuan
264daa2be4
Set and respect HTTP/2 SETTINGS_MAX_HEADER_LIST_SIZE ( #2084 )
2018-07-09 11:27:58 -07:00
dfawley
40a879c23a
client: Implement gRFC A6: configurable client-side retry support ( #2111 )
2018-06-27 16:18:41 -07:00
mmukhi
3ec535a269
client, server: update dial/server buffer options to support a "disable" setting ( #2147 )
2018-06-27 11:16:33 -07:00
Menghan Li
e218c924aa
status: handle invalid utf-8 characters ( #2109 ) ( #2134 )
...
fixes #2078
A status with invalid utf-8 characters could still be created, but invalid characters will be replaced with [Unicode replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character ) before being sent out. Those bytes will still be percent encoded.
All details added to this invalid status will be dropped.
2018-06-14 13:53:31 -07:00
Jean de Klerk
0e5a36b652
internal: move leakcheck to internal/ ( #2129 )
...
internal: move leakcheck to internal/
2018-06-07 16:57:56 -07:00
Menghan Li
26ac8d285c
Revert "status: handle invalid utf-8 characters" ( #2127 )
...
Reverts grpc/grpc-go#2109
Test failure:
https://travis-ci.org/grpc/grpc-go/builds/388898555
Possible reason: `proto.Marshal` doesn't always return error even if message contains invalid utf8 char.
2018-06-06 17:58:36 -07:00
Menghan Li
9c658603f0
status: handle invalid utf-8 characters ( #2109 )
...
fixes #2078
A status with invalid utf-8 characters could still be created, but invalid characters will be replaced with [Unicode replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character ) before being sent out. Those bytes will still be percent encoded.
All details added to this invalid status will be dropped.
2018-06-06 10:58:32 -07:00
Carl Mastrangelo
dbffeabcbc
test: make end2end test use split grpc / proto imports ( #2069 )
2018-05-16 10:03:45 -07:00
mmukhi
0bc7c3280e
Revert "Less mem ( #1987 )" ( #2049 )
...
This reverts commit 7a8c989507 .
2018-05-03 11:37:59 -07:00
mmukhi
3592bccfd9
interop: Fix unimplemented method test ( #2040 )
...
* Don't send nil requests.
* Fix import name and get rid of condition.
* Let registered encoder deal with nil requests.
* Break encode into encode and compress.
2018-05-02 16:08:12 -07:00
lyuxuan
4166ea7dad
Stage 2: Channelz metric collection ( #1909 )
2018-04-23 11:22:25 -07:00
Menghan Li
0c6b34bbc3
cleanup: extend dial context for TestFailFastRPCErrorOnBadCertificates to 10 seconds ( #1984 )
2018-04-12 15:05:04 -07:00
lyuxuan
7f73c863c0
Channelz: Entity Registration and Deletion ( #1811 )
2018-04-09 11:13:06 -07:00
mmukhi
d0a21a3347
Export changes to OSS. ( #1962 )
2018-04-05 10:45:41 -07:00
dfawley
2eae9d0c74
server: add grpc.Method function for extracting method from context ( #1961 )
2018-04-02 13:08:04 -07:00
lyuxuan
738eb6b62f
fix minor typos and remove grpc.Codec related code in TestInterceptorCanAccessCallOptions ( #1929 )
2018-03-19 14:19:42 -07:00
Joshua Humphries
fa28bef939
client: export types implementing CallOptions for access by interceptors ( #1902 )
2018-03-16 15:57:34 -07:00
Menghan Li
3926816d54
addrConn: Report underlying connection error in RPC error ( #1855 )
2018-02-14 14:13:10 -08:00
dfawley
445b7284b1
Fix data race in TestServerGoAwayPendingRPC ( #1862 )
2018-02-13 16:48:27 -08:00
mmukhi
484b3ebb4a
transport: fix race causing flow control discrepancy when sending messages over server limit ( #1859 )
...
* In case of an error write transport quota back.
* Added test.
2018-02-13 11:17:19 -08:00
dfawley
365770fcbd
streams: Stop cleaning up after orphaned streams ( #1854 )
...
This change introduces some behavior changes that should not impact users that
are following the proper stream protocol. Specifically, one of the following
conditions must be satisfied:
1. The user calls Close on the ClientConn.
2. The user cancels the context provided to NewClientStream, or its deadline
expires. (Note that it if the context is no longer needed before the deadline
expires, it is still recommended to call cancel to prevent bloat.) It is always
recommended to cancel contexts when they are no longer needed, and to
never use the background context directly, so all users should always be
doing this.
3. The user calls RecvMsg (or Recv in generated code) until a non-nil error is
returned.
4. The user receives any error from Header or SendMsg (or Send in generated
code) besides io.EOF. If none of the above happen, this will leak a goroutine
and a context, and grpc will not call the optionally-configured stats handler
with a stats.End message.
Before this change, if a user created a stream and the server ended the stream,
the stats handler would be invoked with a stats.End containing the final status
of the stream. Subsequent calls to RecvMsg would then trigger the stats handler
with InPayloads, which may be unexpected by stats handlers.
2018-02-08 10:51:16 -08:00
dfawley
d09ec43545
Implement unary functionality using streams ( #1835 )
2018-02-05 12:54:13 -08:00
Menghan Li
424e3e9894
Stream: do not cancel ctx created with service config timeout ( #1838 )
2018-02-02 10:35:15 -08:00
Menghan Li
f9628db66d
Fix lint error and typo ( #1843 )
2018-02-01 11:38:14 -08:00
lyuxuan
c22018a9fb
client: send RST_STREAM on client-side errors to prevent server from blocking ( #1823 )
2018-01-24 11:18:05 -08:00
dfawley
5ba054bf37
encoding: Introduce new method for registering and choosing codecs ( #1813 )
2018-01-23 11:39:40 -08:00
mmukhi
46bef23bc3
Write should fail when the stream was done but context wasn't cancelled. ( #1792 )
2018-01-18 15:49:00 -08:00
dfawley
09fc336d84
server: fix bug preventing Serve from exiting when Listener is closed ( #1765 )
2017-12-22 12:42:04 -08:00
Menghan Li
e6549e636d
Add dial option to set balancer ( #1697 )
...
WithBalancerName dial option specifies the name of the balancer to be used by the ClientConn. Service config updates can NOT override the balancer option.
2017-12-18 15:35:42 -08:00
dfawley
f4b523765c
status: add Code convenience function ( #1754 )
2017-12-18 15:00:50 -08:00
Daniel Nephin
4e393e0b21
grpc: fix deprecation comments to conform to standard ( #1691 )
2017-12-18 09:23:42 -08:00
dfawley
d1fc8fa770
Deflake tests that rely on Stop() then Dial() not reconnecting ( #1728 )
2017-12-13 09:30:53 -08:00
dfawley
43083423e4
Change parseTimeout to not handle non-second durations ( #1706 )
2017-12-05 10:04:04 -08:00
lyuxuan
d6cc72862b
switch balancer based on service config info ( #1670 )
2017-11-17 11:11:05 -08:00
dfawley
816fa5b06f
Add proper support for 'identity' encoding type ( #1664 )
2017-11-17 09:24:54 -08:00
Menghan Li
409fd8e23b
addrConn: set ac.state to TransientFailure upon non-temporary errors ( #1657 )
...
So failfast RPCs will fail with unavailable errors when this happens.
2017-11-13 16:33:42 -08:00
dfawley
8ff8683602
Implement transparent retries for gRFC A6 ( #1597 )
2017-11-06 13:45:11 -08:00
Gyu-Ho Lee
865013bc17
*: replace deprecated grpc.Errorf calls with status.Errorf ( #1651 )
2017-11-06 10:24:20 -08:00
Zhouyihai Ding
5db344a40a
Introduce new Compressor/Decompressor API ( #1428 )
2017-10-31 10:21:13 -07:00
lyuxuan
a4ff4e29c4
Get method string from stream ( #1588 )
2017-10-26 16:03:44 -07:00
mmukhi
0d399e6307
Remove self-imposed limit on max concurrent streams if the server doesn't impose any. ( #1624 )
...
* Remove self-imposed limit on max concurrent streams if the server allows it.
* Remove test necessitating buggy behavior.
2017-10-26 10:05:17 -07:00
Menghan Li
1687ce5770
ClientHandshake should get the dialing endpoint as the authority ( #1607 )
2017-10-23 11:40:43 -07:00
lyuxuan
6f3b6ff46b
Parse ServiceConfig JSON string ( #1515 )
2017-10-19 12:09:19 -07:00
Menghan Li
a353537ff5
Register and use default balancers and resolvers ( #1551 )
2017-10-19 11:32:06 -07:00
Menghan Li
c06db1c7c5
Skip proxy_test in race mode ( #1584 )
2017-10-17 11:26:58 -07:00
Menghan Li
5131c1f096
Use proto3 in interop tests and end2end tests ( #1574 )
2017-10-12 14:05:19 -07:00
dfawley
c8405557a4
Remove Go1.6 support ( #1492 )
2017-10-04 13:57:10 -07:00
Menghan Li
3bf110cd0c
fix TestServerCredsDispatch and stats test race ( #1554 )
2017-10-03 17:07:39 -07:00
Menghan Li
4bbdf230d7
New implementation of roundrobin and pickfirst ( #1506 )
2017-10-02 09:22:57 -07:00
Menghan Li
59cb69e66d
Fix misspells ( #1531 )
2017-09-20 14:55:57 -07:00
dfawley
a7dba25a82
Speed up end to end tests by removing an unnecessary sleep ( #1521 )
2017-09-18 11:48:03 -07:00
mmukhi
894322f00c
Dedicated goroutine for writing. ( #1498 )
2017-09-14 13:44:14 -07:00
Menghan Li
8233e124e4
Add new Resolver and Balancer APIs (gRFC L9) ( #1408 )
...
- Add package balancer and resolver.
- Change ClientConn internals to new APIs and adds a wrapper for v1 balancer.
2017-08-31 10:59:09 -07:00
Menghan Li
e67952ee26
Move leak check into a separate leakcheck package ( #1445 )
2017-08-31 10:16:06 -07:00
dfawley
e60698345e
Fix context warnings from govet. ( #1486 )
...
Pre-req work for #1484
2017-08-29 11:04:15 -07:00
dfawley
0b4b292f3a
transport: fix handling of InTapHandle's returned context ( #1461 )
2017-08-25 13:18:45 -07:00
dfawley
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
dfawley
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
lyuxuan
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
Menghan Li
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
Jack Li
059280c96e
Set peer before sending request ( #1423 )
2017-08-07 10:39:34 -07:00
Menghan Li
b463cc3276
Call cancel on contexts in tests ( #1412 )
2017-08-02 10:43:35 -07:00
田欧
ca9e0c3458
Add testdata package and unify testdata to only one dir ( #1297 )
2017-07-25 10:24:45 -07:00
mmukhi
a5d184a8a1
Expose ConnectivityState of a ClientConn. ( #1385 )
2017-07-24 15:00:53 -07:00
dfawley
939edc09d6
Revert "Use bufconn in end2end tests." ( #1381 )
...
This reverts commit c7e2c00ed1 .
There is a race between Dial and Close that causes goroutine leaks in the
end2end tests.
2017-07-19 13:57:37 -07:00
Doug Fawley
c7e2c00ed1
Use bufconn in end2end tests.
2017-07-17 17:09:17 -07:00
mmukhi
8264d619d8
Ignore goroutines spanwned by log.init during leakcheck. ( #1368 )
2017-07-11 14:55:05 -07:00
mmukhi
37be128ebf
Update leckCheck to ignore non-gRPC goroutine introduced in Go1.9 ( #1351 )
2017-07-10 14:58:33 -07:00
MakMukhi
8855ede8e3
Deflake TestServerGoAway ( #1321 )
2017-06-22 11:54:19 -07:00
Menghan Li
2887f9478e
Add Severity and VerboseLevel to grpclog. ( #922 )
...
* Add Severity and VerboseLevel to grpclog.
* keep old interface and add loggerv2
* export NewLoggerv2
2017-06-19 13:57:04 -07:00
MakMukhi
dbdb479a60
Deflake TestFlowContolLogicalRace ( #1279 )
2017-06-08 12:54:42 -07:00
Jan Tattermusch
ddbf6c46a6
autofix license notice
2017-06-08 14:42:19 +02:00
MakMukhi
6fecf2831a
Reopening: Server shouldn't Fatalf in case it fails to encode. ( #1276 )
...
* Server shouldn't Fatalf in case it fails to encode.
2017-06-02 12:32:37 -07:00
MakMukhi
843116533a
Revert "Server shouldn't Fatalf in case it fails to encode. ( #1251 )" ( #1274 )
...
This reverts commit d5bc85c1e9 .
2017-06-01 12:34:28 -07:00
MakMukhi
d5bc85c1e9
Server shouldn't Fatalf in case it fails to encode. ( #1251 )
...
* Server shouldn't Fatalf in case it fails to encode.
* golint
* post-review update
2017-06-01 11:57:45 -07:00
Menghan Li
2739967807
re-enable handler_server in end2end test, and fix some failed tests ( #1259 )
2017-05-26 08:26:41 -07:00
MakMukhi
6dff7c5f33
Expand stream's flow control in case of an active read. ( #1248 )
...
* First commit
* Imported tests from the original PR by @apolcyn.
* Formatting fixes.
* More formating fixes
* more golint
* Make logs more informative.
* post-review update
* Added test to check flow control accounts after sending large messages.
* post-review update
* Empty commit to kickstart travis.
* Post-review update.
2017-05-23 11:39:15 -07:00
Yuxuan Li
cb64938381
fix minor issues
2017-05-19 16:02:02 -07:00
Yuxuan Li
d19bbe846e
change max message size functions name
2017-05-19 11:08:40 -07:00
Yuxuan Li
504db8e582
merge master
2017-05-18 14:52:35 -07:00
Tamir Duberstein
3773797869
Travis: add staticcheck ( #1019 )
...
Also only run golint and go vet in Go 1.8, and fix some vet failures.
2017-05-15 17:05:27 -07:00
lyuxuan
7505481848
comments added
2017-05-15 15:13:53 -07:00
Yuxuan Li
35d77ea991
merge master, resolve conflicts
2017-05-15 13:54:22 -07:00
Yuxuan Li
bdf9a640e4
add timeout test, add check or pointer filed in callOption, fix minor issues
2017-05-15 13:51:11 -07:00
Menghan Li
aacd01c219
call listen with "localhost:port" instead of ":port" in tests ( #1237 )
2017-05-15 12:43:49 -07:00
MakMukhi
88a73d35c9
Adding dial options for PerRPCCredentials ( #1225 )
...
* Adding dial options for PerRPCCredentials
* Added tests for PerRPCCredentials
* Post-review updates
* post-review updates
2017-05-11 11:07:38 -07:00
Yuxuan Li
59426b3c05
gofmt
2017-05-08 00:22:57 +00:00
lyuxuan
3ea287058c
Merge branch 'master' into service_config_pr
2017-05-07 16:49:32 -07:00
MakMukhi
f3b5bf53ce
Make window size configurable. ( #1210 )
...
* Make window size configurable.
2017-05-05 13:26:56 -07:00
dfawley
68a5d50f45
Fix go buildable source file problem ( #1213 )
2017-05-02 15:55:05 -07:00
dfawley
b610ffd3f8
Never encode binary metadata within the metadata map ( #1188 )
...
This change ensures consistency for the user when accessing metadata values:
they are never encoded except when sent on the wire. Previously, they would
appear encoded to client code, but not to server code. As such, this
represents a behavior change, but one unlikely to affect user code, as it's
unusual to inspect the metadata after setting it.
2017-04-28 10:56:58 -07:00
Yuxuan Li
9c5f260e67
make max size a pointer type and initialize function a CallOption
2017-04-26 15:50:58 -07:00
Yuxuan Li
bab6b617b7
merge master
2017-04-21 16:07:34 -07:00
MakMukhi
2d949be2fe
Make sure all in-flight streams close when ClientConn.Close() is called. ( #1136 )
...
* Make sure all in-flight streams close when ClientConn.Close() is called.
* added test
2017-04-21 15:03:04 -07:00
Yuxuan Li
cb02ab4d25
change error message from InvalidArgument to ResourceExhausted
2017-04-13 16:51:56 -07:00
Yuxuan Li
8788b75675
merge master resolve conflicts
2017-04-13 16:28:15 -07:00
dfawley
b47cbd158b
Use proto import from google.golang.org instead of github.com ( #1176 )
2017-04-10 10:15:59 -07:00