Commit Graph

2084 Commits

Author SHA1 Message Date
Łukasz Strzałkowski afb82b47fa doc: remove irrelevant java doc
The class and method references in it were removed recently
2017-03-02 22:02:48 -08:00
Łukasz Strzałkowski 0941cf94ea core: add instructions about running tests in IJ 2017-03-02 21:41:29 -08:00
Łukasz Strzałkowski c5e5903598 core: add @nullable annotation
Subchannel can be nullable, add annotation for consitency
2017-03-02 21:39:42 -08:00
Eric Gribkoff f2beea6e9c services: add monitoring service 2017-03-02 15:04:46 -08:00
Eric Anderson 99d6638e6e travis: Add thrift example; it was split out in 5ca4ea7 2017-03-01 16:57:17 -08:00
Carl Mastrangelo 5c37a8360c core: cache Accept-Encoding headers (#2766)
* core: cache Accept-Encoding headers

This avoids rebuilding the raw bytes for each RPC.  The decode path
is not yet optimized to avoid pulling to much into a single commit.
Decompressors may still use invalid names, but this is equivalent to
previous behavior, as cleaing happens later in the caching.

Also, internal accessors on DecompressorRegistry are now hidden.

Before:
Benchmark                                                    (extraEncodings)    Mode      Cnt        Score    Error  Units
DecompressorRegistryBenchmark.marshalOld                                    0  sample   928744      124.104 ± 11.159  ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00                   0  sample                84.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50                   0  sample                94.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90                   0  sample               107.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95                   0  sample               114.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99                   0  sample               202.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999                  0  sample              4944.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999                 0  sample             12178.008           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00                   0  sample           2056192.000           ns/op
DecompressorRegistryBenchmark.marshalOld                                    1  sample  1345050      150.123 ±  6.952  ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00                   1  sample               109.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50                   1  sample               127.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90                   1  sample               142.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95                   1  sample               152.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99                   1  sample               243.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999                  1  sample              4640.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999                 1  sample             11472.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00                   1  sample           2101248.000           ns/op
DecompressorRegistryBenchmark.marshalOld                                    2  sample  1130903      175.846 ±  1.392  ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00                   2  sample               131.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50                   2  sample               148.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90                   2  sample               164.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95                   2  sample               174.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99                   2  sample               311.000           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999                  2  sample              6048.768           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999                 2  sample             12349.107           ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00                   2  sample            112000.000           ns/op

After:
Benchmark                                                    (extraEncodings)    Mode      Cnt        Score   Error  Units
DecompressorRegistryBenchmark.marshalOld                                    0  sample  1095005       67.555 ± 5.529  ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00                   0  sample                42.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50                   0  sample                52.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90                   0  sample                69.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95                   0  sample                84.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99                   0  sample               133.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999                  0  sample              3324.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999                 0  sample             11056.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00                   0  sample           1820672.000          ns/op
DecompressorRegistryBenchmark.marshalOld                                    1  sample  1437034       78.089 ± 0.723  ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00                   1  sample                60.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50                   1  sample                69.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90                   1  sample                79.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95                   1  sample                83.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99                   1  sample                96.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999                  1  sample              2728.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999                 1  sample             11104.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00                   1  sample            105344.000          ns/op
DecompressorRegistryBenchmark.marshalOld                                    2  sample  1203782       95.213 ± 0.864  ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00                   2  sample                68.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50                   2  sample                85.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90                   2  sample                98.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95                   2  sample               101.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99                   2  sample               119.000          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999                  2  sample              3209.736          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999                 2  sample             11257.947          ns/op
DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00                   2  sample             63168.000          ns/op
2017-03-01 15:30:28 -08:00
Eric Gribkoff c2cbd5f29d services: move proto services to io.grpc.protobuf.services 2017-03-01 11:54:50 -08:00
Kun Zhang 2fab8895dc grpclb: fix a bug in handling server address updates.
It didn't check if the address was already there in the current
subchannel set before creating a new subchannel for it, causing a leak
of subchannels.
2017-03-01 10:47:02 -08:00
Eric Gribkoff e345273268 services: don't update reflection index mid-stream
This fix addresses https://github.com/grpc/grpc-java/issues/2689
2017-02-28 20:05:26 -08:00
Eric Anderson 437fafab1b Address review comments 2017-02-28 09:23:04 -08:00
Eric Anderson 2eeb5e3e9e all: Downgrade to Guava 19
Guava 20 introduced some overloading optimizations for Preconditions
that require using Guava 20+ at runtime. Unfortunately, Guava 20 removes
some things that is causing incompatibilities with other libraries, like
Cassandra. While the incompatibility did trigger some of those libraries
to improve compatibility for newer Guavas, we'd like to give the
community more time to work through it. See #2688

At this commit, we appear to be compatible with Guava 18+. It's not
clear if we want to actually "support" 18, but it did compile. Guava 17
doesn't have at least MoreObjects, directExecutor, and firstNotNull.
Guava 21 compiles without warnings, so it should be compatible with
Guava 22 when it is released.

One test method will fail with the upcoming Guava 22, but this won't
impact applications. I made MoreThrowables to avoid using any
known-deprecated Guava methods in our JARs, to reduce pain for those
stuck with old versions of gRPC in the future (July 2018).

In the stand-alone Android apps I removed unnecessary explicit deps
instead of syncing the version used.
2017-02-28 09:23:04 -08:00
Eric Anderson e67b6027af interop-testing: Remove useless tcnative configuration
It doesn't do anything, since tcnative has been specified as a normal
dependency for a while.
2017-02-27 17:12:07 -08:00
Lukasz Strzalkowski 2131dfe6f4 doc: there's no type param anymore 2017-02-27 10:25:00 -08:00
Lukasz Strzalkowski f995c6c9d4 doc: fix @link to cancel in java doc 2017-02-27 09:48:34 -08:00
Lukasz Strzalkowski efe261ea43 core: remove SingleTransportChannel, not used 2017-02-27 08:35:51 -08:00
Eric Anderson c415dc8d40 netty: Use tcnative in tests instead of Jetty ALPN
I'm quite confused how we went this long using Jetty ALPN for the Netty
tests. Anyway, we strongly prefer tcnative, so we should be using it in
the tests.
2017-02-24 17:04:35 -08:00
Kun Zhang a9bd94781c core: promote LBv2 classes. 2017-02-24 16:48:44 -08:00
Kun Zhang a6b1d8981a core: delete the old channel impl and LoadBalancer. 2017-02-24 16:48:44 -08:00
Eric Anderson 675080b208 all: Enable ErrorProne during compilation
ErrorProne provides static analysis for common issues, including
misused variables GuardedBy locks.

This increases build time by 60% for parallel builds and 30% for
non-parallel, so I've provided a way to disable the check. It is on by
default though and will be run in our CI environments.
2017-02-24 14:53:23 -08:00
Eric Anderson a2f15ae61c android-interop-testing: Fix checkstyle violations (imports) 2017-02-24 10:04:34 -08:00
Eric Anderson 5ca4ea7272 examples: Split thrift from the multi-project build
grpc-thrift isn't published yet, which causes build breakage for people
trying to do the protobuf example.

Fixes #2681 (ONCE AND FOR ALL!)
2017-02-24 10:04:02 -08:00
Carl Mastrangelo 218bc03aeb all: recommend the latest gRPC version on master 2017-02-23 16:09:42 -08:00
Eric Gribkoff 58720655c8 compiler: update path to protoc plugin in README 2017-02-23 12:55:55 -08:00
Łukasz Strzałkowski 70b482afad core: clean up code deprecated in 1.1 (#2678) 2017-02-21 14:20:26 -08:00
Łukasz Strzałkowski 63a77658fb Fix link to class in java doc (#2739)
doc: fix link to class in java doc
2017-02-21 09:48:25 -08:00
Kun Zhang 6ff5f2149b core: report error count metrics. (#2734) 2017-02-17 14:07:37 -08:00
Eric Anderson 9283b2b13f interop-testing: Remove useless Threads in test 2017-02-17 11:21:30 -08:00
Lukasz Strzalkowski d116cc9875 netty: Fix NPE in NettyClientTransport
Fixes NPE when keepalive is enabled.

* Move creation of keepAliveManager to the bottom of start()
* Enable keepAlive in NettyClientTransportTest
* Add test cases checking if keepalive is enabled/disabled, specifically.

Fixes #2726
2017-02-16 10:29:52 -08:00
Eric Anderson 72923dca87 all: prepare for ErrorProne's FutureReturnValueIgnored
Futures almost universally should be handled in some way when being
returned, either to receive the value or to cancel scheduled tasks to
prevent leaks.

Netty is a bit of a special case though, since it constantly returns
futures that you ignore (even adding a listener returns the "this"
future). So we want to suppress the warning for code using Netty instead
of trying to fix it. When we enable ErrorProne in the build, we should
start passing -Xep:FutureReturnValueIgnored:OFF in the compilerArgs.
2017-02-16 07:22:56 -08:00
Eric Anderson 9fc4fa18aa releasing: Add docs for creating new Jenkins job 2017-02-14 13:51:07 -08:00
Eric Anderson ae68718881 netty: remove unused code in a test 2017-02-13 16:56:10 -08:00
Łukasz Strzałkowski 26913bb82e netty: include SETTINGS_MAX_HEADER_LIST_SIZE in SETTINGS
Closes #2350
2017-02-13 07:37:54 -08:00
Ryan Michela 4029b3f0c2 Implement missing authority API for HandlerRegistry 2017-02-10 17:19:20 -08:00
ZHANG Dapeng 9c78b466b6 core: DelayedStream getAttributes to throw IllegalStateExeption if not passThrough 2017-02-10 11:13:10 -08:00
Carl Mastrangelo 700abb32af compiler: add some missing final modifiers on generated code 2017-02-10 10:16:43 -08:00
Eric Anderson cc000be12d netty: Fix CheckReturnValue failure in test 2017-02-09 17:16:19 -08:00
Eric Anderson 7e1fd4f370 core: Tweak getAttributes() JavaDoc
It now provides more guarantees and should be more obvious when it is
safe to use.
2017-02-08 12:49:00 -08:00
Kun Zhang 9a81cad952 core: switch to LBv2 as the default. (#2707) 2017-02-07 17:45:28 -08:00
Eric Gribkoff 48e1430909 interop-testing: fix flakes in Http2Client 2017-02-07 16:14:39 -08:00
Eric Anderson 42aa64c647 all: swap to newer animalsniffer plugin
The new plugin uses a newer version of animalsniffer, allows overriding
the animalsniffer version used, and has up-to-date handling. The
up-to-date handling cuts fully incremental parallel build times in half,
from 5.5s to 2.7s.

The previous plugin was supposed to be verifying tests. However, either
it wasn't verifying them or its verification was broken.
2017-02-07 12:49:01 -08:00
Carl Mastrangelo b0323ac22c all: update to protobuf 3.2.0 2017-02-07 09:47:15 -08:00
Carl Mastrangelo 50a4278671 all: drop thrift from grpc-all deps 2017-02-07 08:08:48 -08:00
Carl Mastrangelo dfe61e4ed3 netty: fix race in server channel startup and shutdown 2017-02-06 15:44:03 -08:00
Carl Mastrangelo 1928dc7779 netty: add return value errorprone annotations 2017-02-06 14:53:29 -08:00
Kun Zhang 45642096c3 core: un-abstract the LBv2 setter in ManagedChannelBuilder. (#2697)
The LBv2 setter was added in #2658 as an abstract method, which breaks
anyone who implements ManagedChannelBuilder.  Here we add a default
implementation that throws.
2017-02-06 13:26:47 -08:00
Kun Zhang 7ab5e0e810 core: record server_elapsed_time on client (#2673)
It is defined as the time between the client sends out the headers, and the RPC finishes.
2017-02-03 13:29:06 -08:00
kpayson64 6fbe140959 interop-testing: Replace Mockito with StreamObserver for several tests (#2639) 2017-02-02 10:21:41 -08:00
ZHANG Dapeng b1aee9fcc0 netty: call transportReady in handleProtocolNegotiationCompleted
implements the comments mentioned in #2619
2017-02-01 14:55:55 -08:00
Eric Anderson a7b4dfd345 docs: Remove annoying diff section heading
The section heading in unified diff is optional. In this case the
heading is pretty useless and causes problems.
2017-02-01 13:10:34 -08:00
Eric Anderson 57b9105c7f interop-testing: overrideAuthority breaks JWT
Commit 65e4d9f4 broke the jwt_token_creds. It is believed to be because
the JWT does not see the authority passed to overrideAuthority. So the
changes to interop-testing client are temporarily reverted here. Note
that this breaks GRPC_PROXY_EXP testing, so the incompatibility needs to
be resolved.

Solving #2682 will allow reverting this change.

Fixes grpc/grpc#9497
Fixes #2680
2017-02-01 08:38:53 -08:00