Commit Graph

3380 Commits

Author SHA1 Message Date
Akim239 a67fa8a87b Improved formatting for advantages list.
Some markdown parsers require an empty line before lists to parse them as such.
2019-04-04 15:11:41 -07:00
ZHANG Dapeng 1c276a823b
core: refactor lookUpServiceConfig(boolean) to disableServiceConfigLookUp()
Refactor as discussed in #5189. Will backport to v1.20.0 to reduce a cycle of deprecation process.
2019-04-04 14:01:19 -07:00
Carl Mastrangelo faf6ff9f98
core: add client and server call perfmark annotations
This code is highly experimental, so we can change it at will later. This PR is to go ahead and try it out.

Perfmark task calls are added to the client and server calls public APIs, recording when the calls begin and end. They use separate scope IDs (roughly these are Thread IDs) for the listener and the call due to no synchronization between them. However, they both use the same PerfTags, which allows them to be associated.

In the future, we can plumb the tag down into the stream to include deeper information about whats going on in a call.
2019-04-03 18:16:22 -07:00
ZHANG Dapeng a17f8ab62c
buildscripts: add android-interop-test build (without runing test) in kokoro android 2019-04-03 14:22:39 -07:00
ZHANG Dapeng 40526086eb
interopt-testing: move mockito from compile to testCompile (#5541)
Resolves #5540
2019-04-03 14:09:03 -07:00
ZHANG Dapeng 63d512ecb4
android-interop-test: add mockito dependency
android-interop-test now needs explicit mockito dependency because of #5535
2019-04-03 10:07:18 -07:00
ZHANG Dapeng 3325881eae
testing: move mockito from compile to testCompile 2019-04-03 08:55:31 -07:00
ZHANG Dapeng 755a22790b
android/android-interop-testing/examples: upgrade android plugin
This resolves #5523

While bumping `com.android.tools.build:gradle:3.1.2` to `3.3.0`, some other plugins/artifacts/maven repo/buildscripts have to be updated:

- gradle (wrapper) need to upgrade to 4.10.x
- protobuf gradle plugin need to bump a version compatible with gradle version.
- need add `google()` and `jcenter()` repos for android (otherwise `com.android.tools.build:aapt2:3.3.0x` and `trove4j` will not be found resp.)
- need to accept license for Android "build-tools;28.0.3" in kokoro env.
2019-04-02 14:52:27 -07:00
ZHANG Dapeng 30038fd0be
xds: remove unused code in test 2019-04-02 13:52:55 -07:00
Carl Mastrangelo d8b5d84ce7
perfmark: add a perf annotation package 2019-03-29 11:29:36 -07:00
Nick Hill 5f88bc42bf stub: optimize ThreadlessExecutor used for blocking calls
The `ThreadlessExecutor` currently used for blocking calls uses `LinkedBlockingQueue` which is relatively heavy both in terms of allocations and synchronization overhead (e.g. when compared to `ConcurrentLinkedQueue`). It accounts for ~10% of allocations and ~5% of allocated bytes per-call in the `TransportBenchmark` when using in-process transport with [stats and tracing disabled](https://github.com/grpc/grpc-java/issues/5510).

Changing to use a `ConcurrentLinkedQueue` results in a ~5% speedup of that benchmark.

Before:
```
Benchmark                         (direct)  (transport)  Mode  Cnt      Score     Error  Units
TransportBenchmark.unaryCall1024      true    INPROCESS  avgt   60   1877.339 ±  46.309  ns/op
TransportBenchmark.unaryCall1024     false    INPROCESS  avgt   60  12680.525 ± 208.684  ns/op
```

After:
```
Benchmark                         (direct)  (transport)  Mode  Cnt      Score     Error  Units
TransportBenchmark.unaryCall1024      true    INPROCESS  avgt   60   1779.188 ±  36.769  ns/op
TransportBenchmark.unaryCall1024     false    INPROCESS  avgt   60  12532.470 ± 238.271  ns/op
```
2019-03-29 10:45:23 -07:00
Carl Mastrangelo ecccdbb3b0
core: update since javadoc, and add toBuilder for NameResolver results 2019-03-29 10:43:08 -07:00
Carl Mastrangelo 17d67f17fa
all: add LoadBalancer overload for Resolution results 2019-03-29 09:31:24 -07:00
Kun Zhang 026e4c53bd
Start 1.21.0 development cycle (#5515) 2019-03-28 13:27:45 -07:00
Carl Mastrangelo 5ef8377efa
core: remove Type from ConfigOrError 2019-03-28 09:40:50 -07:00
Nick Hill a8c73811dd benchmarks: Ensure ELGs used by TransportBenchmark.NETTY_LOCAL are shutdown
This was an omission from #5492, sorry! Without it there are some ugly warnings in the log.
2019-03-26 16:29:07 -07:00
Chengyuan Zhang 759e7a7fec
examples/kotlin: fix typo in HelloWorld example (#5505) 2019-03-26 14:37:36 -07:00
Nick Hill 8e41f6e43b core: Avoid locks in SynchronizationContext (#5504)
Similar to what's done in SerializingExecutor, it's easy to make SynchronizationContext non-blocking.
2019-03-26 13:54:01 -07:00
Carl Mastrangelo 53f4ad21b4
core: fix DNS JNDI not working if there is an unavailability cause 2019-03-25 16:10:13 -07:00
Chengyuan Zhang 43d38cfa03
services/grpclb: use Stopwatch to provide elapsed time for backoffs (#5491)
* grpclb: use a stopwatch to manage elapased time for LB backoff

* reformatt lines

* create a new Stopwatch for each single newly created HC stream

* use existing stopwatch supplier provided by FakeClock in tests
2019-03-25 10:40:58 -07:00
Nick Hill c8ffa8a8db benchmarks: Use correct ELG type for TransportBenchmark NETTY_LOCAL test (#5492)
Netty LocalChannels are meant to be used with the DefaultEventLoopGroup, but the gRPC channel/server builders use NioEventLoopGroups by default.
2019-03-25 10:22:29 -07:00
Carl Mastrangelo f4a31ec62d
core: deprecate NR.L and add NR.Results 2019-03-22 16:38:28 -07:00
apolcyn 1eb6fc523e interop-testing: implement compute engine channel creds test case in Java 2019-03-21 10:34:51 -07:00
ZHANG Dapeng a2cda8d15d
all: fix lint 2019-03-20 09:01:25 -07:00
Tim van der Lippe d35fbd7eee all: Update to Mockito 2
This is the public port of cl/238445847

Fixes #5319
2019-03-19 14:17:52 -07:00
Carl Mastrangelo c6b505229c
all: move LB parsing logic into LB.Factory 2019-03-19 13:33:13 -07:00
Carl Mastrangelo 6b4a3796a6
core: change DNS error handling to fail on all invalid configs 2019-03-19 09:22:02 -07:00
Fabio Kung 7df2d5feeb netty: default grace time for RPCs can leak memory
Using Long.MAX_VALUE as the delay for Netty's NioEventLoop#schedule can
cause (long) deadlines for scheduled tasks to wrap into negative values,
which is unspecified behavior. Recent versions of netty are guarding
against overflows, but not all versions of grpc-java are using a recent
enough netty.

When connections are gracefully closed, Netty's Http2ConnectionHandler
sets up a timeout task forcing resources to be freed after a grace
period. When their deadlines wrap into negative values, a race was
observed in production systems (with grpc-java <= 1.12.1) causing Netty
to never properly release buffers associated with active streams in the
connection being (gracefully) closed.
2019-03-18 12:38:54 -07:00
Derek Perez e0477bb6e6 bazel: Bazel services + grpc_proto dependency 2019-03-15 11:43:13 -07:00
ZHANG Dapeng 1735adc4c0
core: channelBuilder.defaulServiceConfig() and lookUpServiceConfig() 2019-03-14 16:57:16 -07:00
Jiangtao Li 185cf3d047
alts: add ComputeEngineChannelBuilder to interop test (#5475)
* alts: add ComputeEngineChannelBuilder to interop test

* alts: rename to compute_engine_channel_creds
2019-03-13 18:50:08 -07:00
ZHANG Dapeng 283f04983b
core: reorder code in NameResolver.Listener.onAddress() 2019-03-13 16:54:10 -07:00
Chengyuan Zhang 60e988dc20
COMPILING.md: Update documentation to disable shared lib in compiling protobuf. (#5470) 2019-03-13 12:44:36 -07:00
Eric Anderson e7a635d882
buildscripts: Update protoc-artifacts to 3.7.0
This was missed from d7e53e871

Also added missing --tmpdir, to avoid extracting protobuf
into the current directory.
2019-03-13 13:43:21 -06:00
Jiangtao Li b4af5ad986
ALTS: add ComputeEngineChannelBuilder (#5473) 2019-03-13 12:42:21 -07:00
Dan Torrey f155d60e75 examples: Add a missing space in comment (#5472)
Add a missing space in the comment before requestStream.setOnReadyHandler()
2019-03-13 10:27:15 -07:00
ZHANG Dapeng bd77e886d5
doc: s/<string>/<strong>/ in javadoc 2019-03-12 13:46:13 -07:00
Eric Anderson d7e53e871b
Merge pull request #5454 from ejona86/protobuf-3.7.0
Upgrade to Protobuf 3.7.0
2019-03-11 15:39:50 -06:00
Eric Anderson 57e94d19ea core: Document grpc does not perform compression nego on client 2019-03-11 15:36:21 -06:00
Eric Anderson 656dcc1c7c core,stub: Document grpc performs compression nego on server 2019-03-11 15:36:21 -06:00
ZHANG Dapeng 97ff7fe50a
core: fix thread safety in NameResolver.Listener 2019-03-11 14:35:49 -07:00
Jihun Cho 5ba6619ce5
all: fix lint error (#5464) 2019-03-11 13:58:37 -07:00
Jihun Cho b6d7f6e84f
all: fix lint errors (#5462) 2019-03-11 10:52:12 -07:00
Jihun Cho 4e289de5e6
bom: fix wrong artifact for grpc-compiler (protoc-gen-grpc-java) (#5455) 2019-03-11 10:04:23 -07:00
Brendan Linn 3c24dc6fe1 grpc_java_repositories: fix com_google_protobuf_javalite sha256.
curl -sL 384989534b.zip | shasum -a 256
gives 79d102c61e2a479a0b7e5fc167bcfaa4832a0c6aad4a75fa7da0480564931bcc.
2019-03-10 20:20:14 -06:00
Carl Mastrangelo 0c23735cfc
core: separate service config parsing and add NR.Helper method 2019-03-10 15:36:34 -07:00
Jihun Cho aed4e40b60
netty: bump netty version to 4.1.34.Final (#5449) 2019-03-08 15:58:48 -08:00
Kun Zhang f095926d2c
core: stop catching exceptions from NameResolver.start() (#5452)
It's not supposed to throw. Any exception from it should be considered
a bug and deserves a panic.
2019-03-08 15:21:36 -08:00
Carl Mastrangelo e5e01b5169
core,grpclb: use better generics on service config 2019-03-08 14:11:13 -08:00
Carl Mastrangelo cbec70ab93
grpclb: fix lint 2019-03-07 21:17:49 -08:00