apolcyn
6dbe3921ed
core: fix SRV record parsing
...
* only unquote TXT data, so as to not remove spaces from SRV data
2018-06-04 18:59:15 -07:00
ZHANG Dapeng
c796901aca
core: channel tracing to log events for channel state change
2018-06-04 17:38:26 -07:00
ZHANG Dapeng
8a3e623be7
Start 1.14.0 development cycle
2018-06-04 16:08:31 -07:00
Bogdan Drutu
2a127ce3e7
core: update opencensus to 0.12.3. ( #4530 )
...
Changed calls to deprecated methods to the newly added methods.
2018-06-04 15:27:27 -07:00
ZHANG Dapeng
a0794d5a68
core: Implement channel tracing for some events
...
Includes
- API plumbing for channel tracing `+ManagedChannelBuilder.maxTraceEvents()`
- trace logging for channel/subchannel creation events and name resolving events.
Trace logging for all other events will be added in subsequent PRs.
2018-06-01 07:33:37 -07:00
zpencer
25a2ec1ef3
core: fix ServerBuilder.setBinaryLog javadoc ( #4514 )
...
The javadoc should refer to server not channel.
2018-05-31 18:14:44 -07:00
ZHANG Dapeng
608ce3d344
core: unit test for channel shutdown during retry backoff
2018-05-24 17:18:05 -07:00
zpencer
ff9aa39bb6
core,services: fix lints ( #4504 )
...
- Type parameters must be upper camel case
- constant case field must be final
2018-05-24 11:12:30 -07:00
Eric Anderson
e41e054776
Propagate CallCredentials.ATTR_SECURITY_LEVEL from transports
...
Previously no transport provided the key so CallCredentials would always
see the security as NONE.
2018-05-24 09:51:45 -07:00
zpencer
27439876f2
services,core: make BinaryLogSink visible, add setter ( #4503 )
...
* make BinaryLogSink public
* add io.grpc.BinaryLog to server/channel builder
2018-05-23 20:49:09 -07:00
zpencer
1f99fcdc82
move io.grpc.BinaryLogProvider to io.grpc.services ( #4501 )
...
Add internal accessors for ServerInterceptors and ClientInterceptors because some helpers were pkg private
Fix tests that were once creating BinaryLogProvider instances, they should now only create io.grpc.BinaryLog instances
2018-05-23 17:04:48 -07:00
zpencer
1aec994475
io.grpc.BinaryLog is now the fully functional API ( #4498 )
...
classes in internal now use the io.grpc.BinaryLog API,
io.grpc.BinaryLogProvider is an implementation of the API and will be
moved to io.grpc.services.
2018-05-23 15:58:37 -07:00
ZHANG Dapeng
6f2980e979
core: fix Attributes hashCode
2018-05-23 13:27:03 -07:00
Kun Zhang
68a462e447
noop: resolve lint warnings found at import. ( #4496 )
2018-05-23 11:58:19 -07:00
ZHANG Dapeng
451c412354
core: fix client does not detect truncated message
...
Resolves #3264
2018-05-21 13:51:15 -07:00
Jianwei Mao
10291d5ccc
core: fix missing comment for headers param
2018-05-21 13:10:58 -07:00
ZHANG Dapeng
f5f560ad36
all: TimeProvider to use nanos rather than millis
...
This is the same practice as #2833
2018-05-21 12:44:06 -07:00
zpencer
faffb09f0a
core: remove io.grpc core dependency on census ( #4461 )
...
io.grpc (core) does not strictly require census. Move the usages and
and remove census from BUILD.bazel .
2018-05-18 14:56:45 -07:00
zpencer
850249f9ca
core: fix lints from import ( #4472 )
...
The import surfaced a few linter issues.
2018-05-17 16:21:30 -07:00
ZHANG Dapeng
4d94163bbd
core: Add ChannelTracer
...
This is a class similar to `CallTracer`, to be used for Channel Tracing.
The constructor arg `maxEvents` is a param supposed to be provided by `ManagedChannelBuilder`.
2018-05-16 10:56:41 -07:00
zpencer
e806e387fe
core: put @ExperimentalApi on CallOptions.of() ( #4466 )
...
This marks the method as still experimental, to be clear to users that
they are using an experimental api.
2018-05-15 15:56:42 -07:00
ZHANG Dapeng
6a96656764
core: make channel stats' channel state consistent with subchannels
...
Moved `setState()` inside of `channelExecutor` runnable together with `setSubchannels`, otherwise the state may be inconsistent with subchannels, say channel state is the initial IDLE but subchannels is non-empty with active transports, or channel state is READY but subchannels is empty.
2018-05-15 15:48:57 -07:00
ZHANG Dapeng
bf4a00c6de
context/core/netty: Add @CheckReturnValue to Context
...
By adding inner class annotations without introducing external dependencies.
2018-05-15 13:14:30 -07:00
ZHANG Dapeng
561583be14
core,services: Add ChannelTracing data object
...
Added `ChannelTrace` as an inner class of `Channelz`.
This is in preparation for the implementation of [Channel Tracing](https://github.com/grpc/proposal/blob/master/A3-channel-tracing.md )
2018-05-15 11:33:44 -07:00
zpencer
04a90bcad2
core: stabilize custom CallOptions API ( #4457 )
...
Deprecate `of()` in favor of `create()` and
`createWithDefault()`. Emphasize that the name string is only for
debug purposes.
Fixes #1869
2018-05-15 10:03:46 -07:00
zpencer
21b73bbdc1
core: partially stabilize Attributes API ( #4458 )
...
Deprecate static builder method, Keys.of(), add a notice of plans to
remove keys(), emphasize that the name is only a debug label.
The `@ExperimentalAPI` is left on the class because there are still
issues around hashCode/equals.
2018-05-14 11:30:06 -07:00
zpencer
902baa0cde
core: do not use internal accessors in BinaryLogProvider ( #4454 )
...
Now that this class is in `io.grpc` the accessor is not needed.
2018-05-09 12:21:05 -07:00
zpencer
247a76ed93
core,netty,okhttp: make toString more consistent for channelz ( #4434 )
...
Use MoreObjects.toStringHelper and use only the log id's long value,
because the class name is already present in the toStringHelper.
2018-05-07 11:38:16 -07:00
zpencer
6f29b60dcf
core, services: make BinaryLog an explicit object that is passed into channels/servers ( #4431 )
...
remove SPI, io.grpc.BinaryLog is a public API that is passed into builders and must be
explicitly closed.
2018-05-07 07:41:42 -07:00
Carl Mastrangelo
60a0b0c471
all: normalize copyright header
2018-05-03 14:55:21 -07:00
Eric Anderson
894c815832
core: Document Metadata ownership passes to the Call{,Listener}
...
This was already clearly documented in ServerCall.Listener and
ClientCall.
2018-05-03 07:08:27 -07:00
Grant Oakley
6bf8e0c084
core: add @CheckReturnValue to CallOptions
2018-05-02 15:56:52 -07:00
ZHANG Dapeng
e19e8f7d40
core: populate effective deadline to ClientStream
...
Added `ClientStream.setDeadline(Deadline deadline)` method, which will set the timeout header.
Resolves #4412
2018-05-02 13:31:03 -07:00
ZHANG Dapeng
d50c191aca
core/stub: fix lint warnings
2018-05-02 10:37:32 -07:00
Grant Oakley
fcb48ff216
core,stub: Add toString() to ClientCallImpl and GrpcFuture
2018-05-01 16:49:56 -07:00
ZHANG Dapeng
b58e0f4059
core: stickiness for RoundRobinLoadBalancer
...
Add weak stickiness support for Round Robin lb.
2018-04-30 16:46:35 -07:00
zpencer
acfb3b9851
services,core: simplify CallId generation ( #4365 )
...
BinaryLog.java is the class that is responsible for intercepting
client and server calls. It now requires a CallId to be passed
in. The BinaryLogProviderImpl is responsible for generating a
CallId and passing it in.
2018-04-27 18:32:36 -07:00
zpencer
9ada30b25d
(low priority) core,netty,interop-testing: stabilize maxInboundMessageSize API ( #4399 )
...
On server side, `maxMessageSize` is deprecated for
`maxInboundMessageSize` to match the channel builder.
Update usages to use new setter.
2018-04-27 16:01:16 -07:00
zpencer
1a2d076aed
core,netty,okhttp,services,testing: expose security info to channelz ( #4300 )
...
Pull the TLS info from the SSLSession object for TLS, and AltsContext for ALTS.
2018-04-25 14:38:09 -07:00
zpencer
62e6e2de78
Start 1.13.0 development cycle ( #4383 )
2018-04-23 15:24:24 -07:00
Carl Mastrangelo
c37ea15830
core: also expose parser on JsonParser
2018-04-20 13:25:21 -07:00
ZHANG Dapeng
74532acce0
core: use List instead of Set for drainedSubstreams
...
This improves latency performance (retry enabled) for NETTY transport by about 2us. For INPROCESS, NETTY_LOCAL, OKHTTP transports, the improvement seems much less than 2us.
```
before
Benchmark (direct) (transport) Mode Cnt Score Error Units
TransportBenchmark.unaryCall1024 true NETTY sample 260801 76566.536 ± 189.439 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.00 true NETTY sample 60480.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.50 true NETTY sample 75264.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.90 true NETTY sample 85504.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.95 true NETTY sample 87424.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.99 true NETTY sample 100864.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.999 true NETTY sample 140800.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.9999 true NETTY sample 205547.469 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p1.00 true NETTY sample 3915776.000 ns/op
TransportBenchmark.unaryCall1024 false NETTY sample 208352 95865.619 ± 113.142 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.00 false NETTY sample 72576.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.50 false NETTY sample 93568.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.90 false NETTY sample 105728.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.95 false NETTY sample 109568.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.99 false NETTY sample 124544.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.999 false NETTY sample 161792.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.9999 false NETTY sample 230520.448 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p1.00 false NETTY sample 3997696.000 ns/op
```
```
after
Benchmark (direct) (transport) Mode Cnt Score Error Units
TransportBenchmark.unaryCall1024 true NETTY sample 269471 74104.666 ± 182.514 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.00 true NETTY sample 60992.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.50 true NETTY sample 70912.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.90 true NETTY sample 83584.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.95 true NETTY sample 85888.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.99 true NETTY sample 100224.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.999 true NETTY sample 142848.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.9999 true NETTY sample 489527.706 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p1.00 true NETTY sample 4300800.000 ns/op
TransportBenchmark.unaryCall1024 false NETTY sample 216000 92468.337 ± 90.229 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.00 false NETTY sample 68480.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.50 false NETTY sample 89472.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.90 false NETTY sample 103680.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.95 false NETTY sample 107008.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.99 false NETTY sample 120960.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.999 false NETTY sample 159232.000 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.9999 false NETTY sample 272076.493 ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p1.00 false NETTY sample 2662400.000 ns/op
```
2018-04-20 11:22:32 -07:00
Eric Anderson
ddf77f59cc
core: Fix experimental API issue for channel state API
...
The earlier issue was for the feature itself, not the stabilization.
2018-04-19 17:38:20 -07:00
zpencer
934c2e2fd7
core: clarify binlog API ( #4362 )
...
The interceptors are a part of the implementation and not meant for
callers.
Both methods for wrapping clients / servers can be `final`.
2018-04-19 17:32:45 -07:00
zpencer
ec95999124
core: remove unneeded binlog tests for ManagedChannelImpl ServerImpl ( #4361 )
...
Replace the tests with tests that just make sure binary log is
installed. Better tests exist today in BinaryLogProviderTest to make
sure the actual logic is correct.
2018-04-19 16:55:32 -07:00
ZHANG Dapeng
e67a61fa08
core: refactor ManagedChannelImplTest with a configurable builder
...
In previous code of `ManagedChannelImplTest`, new tests will have to add more and more custom args in `createChannel(...)`, and each time when a custom arg is needed all other default args need be repeatedly provided in `createChannel(...)`. In most cases those args are just builder attributes. So this PR makes ManagedChannelImplTest easier to stub by providing a builder field, then new tests will just set necessary builder attributes before calling `createChannel()`.
2018-04-19 10:06:39 -07:00
ZHANG Dapeng
f6a032d6b2
core: forward toString for forwarding classes
...
Forward `toString()` method for forwarding classes to improve debug information.
For example, `ForwardingManagedChannel.toString()` will return something like:
```
ForwardingManagedChannel{delegate=ManagedChannelImpl{logId=tag-13247, target=localhost:8080}}
```
2018-04-19 10:05:48 -07:00
Carl Mastrangelo
f754bff906
core: make JsonParser public
2018-04-18 18:49:08 -07:00
zpencer
30400e0e58
core: add sockets to subchannel stat ( #4345 )
...
This is info not being reported at the moment and is missing from the
display.
2018-04-16 11:33:28 -07:00
zpencer
c04278ea07
services: turn channelz null futures into Status.UNIMPLEMENTED ( #4346 )
...
Then channelz GUI will take this into account. This is particularly
useful for InProcessTransport, where I have decided we do not need
special support for in channelz. The server and channel stats are
already sufficient.
2018-04-16 09:54:35 -07:00