Commit Graph

1262 Commits

Author SHA1 Message Date
Carl Mastrangelo bcbc6ae8fd
core: stabilize Status Exceptions API, and warn on null trailers in Status 2018-07-27 15:53:44 -07:00
Carl Mastrangelo 9b200eb7be
core: add flags for selectively enabling grpclb 2018-07-27 15:24:43 -07:00
ZHANG Dapeng 658e73a69e
core: let channel tracing log service config changes
This is the implementation of the second one of the changes to the channel tracing spec
grpc/proposal#89
2018-07-25 10:42:00 -07:00
ZHANG Dapeng 03d85ee53e
doc: clarify channel state API unimplemented until v1.6.1
Resolves #4624
2018-07-24 14:01:24 -07:00
Carl Mastrangelo 8da06a8bc4
all: remove unneeded deps on errorprone 2018-07-23 17:51:44 -07:00
zpencer 67073c921e
core: turn PairSocketAddress into ProxySocketAddress (#4649)
This internal class will only ever be used to plumb proxy info.
2018-07-23 17:43:26 -07:00
George Gensure 19b2a17801 core: Don't close in TSREI in cancelled contexts (#4596)
Prevent multiple effective close calls either by successful completion
of a cancel or complete notification, or through successive exceptions
handled within a single call.
2018-07-23 14:39:39 -07:00
ZHANG Dapeng e1865b565d
core: channel tracing log only when number of backends changed between zeor and nonzero
This is to implement one of changes made in the spec
https://github.com/grpc/proposal/pull/89/files
2018-07-23 14:30:38 -07:00
Eric Gribkoff 877b1a198f
core: enterIdleMode() exits idle if still in use (#4630) 2018-07-23 09:45:06 -07:00
Carl Mastrangelo 64d272ae7c
core: make service config errors recoverable 2018-07-20 17:47:03 -07:00
Eric Anderson 15a5ba2698 Remove DoNotMock annotation in favor of JavaDoc
DoNotMock was removed from error_prone_annotations in 2.1.3, because
there was no enforcement mechanism (which is in google/error-prone#572).
Guava and Trust also depend on error_prone_annotations and are beginning
to use newer versions, so our usage of DoNotMock is causing diamond
dependency problems. This allows us to update to 2.2.0.

The annotations were useful internally; we're solving that in cl/205294089.
2018-07-20 14:03:55 -07:00
zpencer 4335445d98
Start 1.15.0 development cycle (#4650) 2018-07-18 10:48:04 -07:00
Carl Mastrangelo 146b6006b3
compiler,stub: update RpcMethod docs and usage 2018-07-12 17:01:47 -07:00
Eric Anderson 9222dc5d01 core: Add missing @Nullable annotations to ClientTransportOptions
Convert the checkNotNull into our more standard line while I'm cleaning
it up.
2018-07-09 17:21:51 -07:00
Eric Anderson 9d6241eedc Propagate EquivalentAddressGroup attributes to transports
Most of the changes are changing the signature of newClientTransport.
Since this is annoying, I choose to introduce a ClientTransportOptions
object to avoid the churn in the future.

With ClientTransportOptions in place, there's only a few lines necessary
of plumbing for the Attributes: add the field to ClientTransportOptions
and populate it in InternalSubchannel. There are no consumers of the
field in this commit.
2018-07-09 13:00:17 -07:00
Eric Anderson 2b48210b73 grpclb: Plumb attributes for OOB and backend channels
These attributes can be used by ALTS-specific code to determine whether
ALTS or TLS should be used.
2018-07-09 11:25:49 -07:00
Eric Anderson dd57b667cc
Fix unused variables
Unused variables in tests were deleted. The unused variable in Netty
was a future that needed completing; that was a bug.
2018-07-04 07:32:57 -07:00
Yang Song 02ad99e1f5 core: Avoid compare default TagContext in thread local with empty. (#4613) 2018-07-03 15:28:05 -07:00
ZHANG Dapeng 6dad047126
core: add jndi timeout and dirContext.close 2018-07-02 17:36:05 -07:00
Eric Anderson e3ff1ade07
core: Add support for List<EAG> in Subchannels
This avoids the needs to flatten to EAGs for cases like PickFirst,
making the Attributes in EAGs able to be used in communication with
core. See #4302 for some discussion on the topic.
2018-07-02 14:00:05 -07:00
Carl Mastrangelo 39d2dd0eaa
core: make InternalHandlerRegistry a HandlerRegistry 2018-06-29 13:01:25 -07:00
Nick Hill b2dd6ae7f0 util: Improve RoundRobinLoadBalancer scalability with stickiness
- Rework stickiness picker logic to be non-blocking
- Stash `Subchannel` ref in an attribute rather than dedicated map
2018-06-29 09:49:23 -07:00
Marco Ferrer ac55604527 fixed typo in round robin factory name const
Fixes: #4598
2018-06-29 09:16:30 -07:00
Eric Anderson 3e67a5be75 core: Avoid unnecessary unchecked cast in DnsNameResolver 2018-06-28 15:47:06 -07:00
Carl Mastrangelo a74bb350b7
core: always do SRV record lookup in DnsNameResolver
Instead of failing after a a missing A/AAAA record, this change
makes the resolver keep going and try out SRV records too.  This
is needed for use with ALTS, and is part of the gRPCLB spec.

This change also moved the JNDI code to a separate, reflectively
loaded file.  This makes it easy to exclude the file and not worry
about the missing class references on Android.  Additionally, if
javax.naming might be available on Android, this allows it to be
loaded.  A key side effect of this is that DnsNameResolver is
smaller, and more cleanly tested.
2018-06-26 16:15:52 -07:00
Carl Mastrangelo 81da3eb95b
core: make Auto config load balancer not depend on service config
Also, add some tests
2018-06-26 13:36:02 -07:00
Doug Lawrie ffd0f9feca inprocess: add a toString for InProcessSocketAddress
The motivation here is in some cases we log the remote-addr that is set in the gRPC call attributes, and have to special case this type to support inprocess servers.
2018-06-22 10:32:42 -07:00
Kun Zhang 15786520f9
grpclb: use exponential back-off for retries of balancer RPCs (#4525) 2018-06-12 14:04:45 -07:00
Grant Oakley defb955f3a core: add clarification to ClientCall javadoc
* Improve ClientCall documentation. Clarify that some methods of ClientCall may be invoked from any thread. Adds @throws clauses to request().
2018-06-12 10:23:01 -07:00
ZHANG Dapeng 5ce10f0146
all: add gradle format checker
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
2018-06-11 18:35:18 -07:00
Carl Mastrangelo 8f51c27319
core: fix lint 2018-06-06 17:14:58 -07:00
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