ZHANG Dapeng
3ffa5a9660
Okhttp: keepAlivedManager#onTransportShutdown moved from shutdown to stopIfNecessary and refactored
...
`keepAlivedManager#onTransportshutdown` should not be called in `transport.shutdown()` because it is possible that there are still open RPC streams, and maybe inactive, so keepalive is still needed.
2017-03-22 10:26:45 -07:00
Kun Zhang
8890888b12
core: delete defunct TransportManager. ( #2846 )
2017-03-22 10:21:59 -07:00
Kun Zhang
c112a2c5d8
core: suggest against overriding Context in ClientInterceptor ( #2838 )
...
Reference: #2829
2017-03-22 09:35:10 -07:00
kpayson64
3db951720c
okhttp: Add restricted AppEngine SSL setup ( #2845 )
2017-03-21 17:24:34 -07:00
Eric Gribkoff
6cf8f059c9
protobuf: utility methods for com.google.rpc.Status
2017-03-21 14:03:46 -07:00
Eric Gribkoff
260fc273b8
services: update monitoring.proto
2017-03-21 10:46:40 -07:00
Eric Gribkoff
00bebc477a
documentation: update path/method for reflection
2017-03-20 12:41:33 -07:00
ZHANG Dapeng
a14689eff8
netty: move startWriteQueue right after channel is constructed
...
Now that the commit 65e4d9f has split the channel instantiation and `connect()`, we can `startWriteQueue()` even earlier.
2017-03-20 11:54:57 -07:00
Carl Mastrangelo
82bdf53cd3
core: use nanos more consistently
2017-03-20 11:09:24 -07:00
Carl Mastrangelo
c6e44b28c9
all: include analytics in releasing notes
2017-03-20 09:53:55 -07:00
Carl Mastrangelo
caa0dd23aa
all: bump recommended version to 1.2.0
2017-03-17 14:54:45 -07:00
ZHANG Dapeng
87c75b3ce7
core: annotate some keys with Immutable; Context.Key final
2017-03-16 17:50:23 -07:00
Eric Anderson
19afd8b48b
core: Support keepalive even when transport is idle
...
Nothing is using this yet, but it will be used on both client and
server.
2017-03-15 17:15:19 -07:00
Carl Mastrangelo
6d44f2ffa4
stub: document withChannel and document method history
2017-03-15 13:31:09 -07:00
ZHANG Dapeng
c44a4b24dd
core: keepaliveManager not to use Ping.onSuccess; ragard onDataReceive as ping Ack
...
Preparing to support server side keepalive.
For the convience on server side, not to use Ping `onSuccess()` callback to cancle shutdownFuture any more, instead, regard `onDataReceived()` as ping Ack and cancel shutdownFuture in it.
2017-03-15 11:15:44 -07:00
Łukasz Strzałkowski
3390b6ae8d
core: add missing @ThreadSafe annotation ( #2823 )
2017-03-15 08:12:31 -07:00
ZHANG Dapeng
cdd572c2d2
testing: temporarily increased newStream_duringShutdown test timeout to 20s
...
Increased timeout to 20 seconds to see if flakiness of #2328 persists. Will take further action after sufficient observation
2017-03-14 14:59:46 -07:00
Eric Anderson
308b6eab08
all: Bump Jetty ALPN agent version, for new JREs
...
Jetty ALPN was broken with jdk1.8.0_121
2017-03-14 14:45:25 -07:00
Eric Anderson
2cb6ecc3b3
netty: Backport SETTINGS ACK sequencing fix
...
This fix was made in netty/netty#6521. Fixes #2801
2017-03-14 14:21:51 -07:00
Eric Anderson
9ef07916f7
netty: Copy DefaultHttp2ConnectionDecoder in prep for backport
2017-03-14 14:21:51 -07:00
Łukasz Strzałkowski
da93a64ec1
core: use withOptions instead of withAffinity ( #2791 )
...
Fixes #2738
Closes #1766
2017-03-14 12:47:10 -07:00
Eric Gribkoff
884b65a891
documentation: monitoring service tutorial
2017-03-13 13:07:38 -07:00
Kun Zhang
7c3f664e9b
grpclb: set LB tokens to headers. ( #2812 )
...
The balancer service attaches a token string for each Server entry it
sends to the client. The client has to set the token to the "lb-token"
header when assigning that Server entry to an RPC.
For convenience of testing, also implemented hashCode() and equals() for
PickResult.
2017-03-10 16:34:33 -08:00
Carl Mastrangelo
7ce2b4f81d
all: start 1.3.0 development cycle
2017-03-06 13:12:44 -08:00
ZHANG Dapeng
1662a719e2
core: fix '@link: can't find...' build noise
...
The build (jdk version jdk1.8.0_91) produces some noise
```
/usr/local/google/home/zdapeng/git/grpc-java/core/src/main/java/io/grpc/LoadBalancer.java:196: warning - Tag @link: can't find pickSubchannel(PickSubchannelArgs) in io.grpc.LoadBalancer.SubchannelPicker
/usr/local/google/home/zdapeng/git/grpc-java/core/src/main/java/io/grpc/LoadBalancer.java:388: warning - Tag @link: can't find pickSubchannel(
PickSubchannelArgs) in io.grpc.LoadBalancer.SubchannelPicker
/usr/local/google/home/zdapeng/git/grpc-java/core/src/main/java/io/grpc/LoadBalancer.java:178: warning - Tag @link: can't find pickSubchannel(PickSubchannelArgs) in io.grpc.LoadBalancer.SubchannelPicker
3 warnings
:grpc-core:javadocJar
```
It seems nothing wrong with the javadoc and it could be a javac's bug, but here's a workaround.
2017-03-06 11:53:04 -08:00
ZHANG Dapeng
891581f14d
all: fix errorprones
...
fix JavaStyle and ErrorProne warnings found in internal weekly import:
- Calls to ExpectedException#expect should always be followed by exactly one statement.
- Do not mock 'java.util.concurrent.Future'
2017-03-06 10:45:42 -08:00
Carl Mastrangelo
ce243a9f21
core: make timeout marshalling less verbose
...
* core: make timeout marshalling less verbose
2017-03-06 09:21:21 -08:00
Eric Anderson
10cbd49dbf
examples: Always pass an executor to Futures.addCallback()
...
The executor-less version is being removed, as having the executor
explicitly specified is less bug-prone.
2017-03-06 08:40:32 -08:00
Jack Amadeo
d21ee58341
Fix shared subchannel state in RoundRobin LB ( #2777 )
...
handleResolvedAddresses constructs subchannels for each address in
an EquivalentAddressGroup, sharing a reference to an immutable
Atrributes. However, as noted, this Attributes instance contains
a mutable AtomicReference, eventually causing subchannel state
changes to be improperly reflected in *all* subchannels of an
EquivalentAddressGroup.
2017-03-03 17:48:05 -08:00
ZHANG Dapeng
acf093dc14
android-interop-testing: fix lint
...
fix JavaStyle and ErrorProne warnings found in internal weekly import
2017-03-03 16:58:58 -08:00
Łukasz Strzałkowski
7bb60dc05c
core: introduce PickSubchannelArgs ( #2740 )
...
This will allow adding new arguments passed to pickSubchannel
without significant API changes in core LB API in the future.
Closes #2737
2017-03-03 12:48:55 -08:00
ZHANG Dapeng
1fb353fa04
core: fix keepalivemanager bug on handling IDLE_AND_PING_SENT
...
There was a bug:
IDLE_AND_PING_SENT -> a new stream starts -> ping acked
would lead the keepalivemanager into IDLE state forever.
2017-03-03 12:18:02 -08:00
Eric Anderson
d7d0d73146
examples: Update imports to new-style
2017-03-03 11:48:46 -08:00
Kun Zhang
9c76b48356
netty/test: be less agreesive on checking cause
...
For #2762
If it doesn't fix the flaky test, status.toString() will print out the
whole stack trace so that we will know what's in there.
2017-03-03 10:31:34 -08:00
Łukasz Strzałkowski
5410b4c624
core: update contributing guidelines w/ pr/commit conventions
2017-03-03 10:04:04 -08:00
Ł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