Commit Graph

2916 Commits

Author SHA1 Message Date
Tom Leach b9d1bb8b8b core: initialize round robin load balancer picker to random index (#4462)
RoundRobinLoadBalancerFactory creates a new Picker instance every time the set of provided address groups changes or the connection state of subchannels associated with existing address groups changes. In certain scenarios, such as deployment/replacement of the target service cluster, this can lead to high churn of Picker objects. Given that each new Picker's subchannel index is initialized to zero, in these scenarios requests can end up getting disproportionately routed through subchannels (and hence server nodes) which are earlier in the list of address groups.

At Netflix we have measured that some service nodes end up taking 3-4x the load that of other nodes during deployment.

This commit randomizes the start index of the RoundRobinLoadBalancerFactory.Picker which eliminates this behavior.
2018-08-01 13:15:17 -07:00
Carl Mastrangelo 85448189ee
all: add tracking issues for all experimental APIs and make it required
Additionally, make Status*Exception.getTrailers() non experimental
2018-07-31 15:28:48 -07:00
Eric Anderson 696082f52e auth: Small improvement to test coverage
This removes an impossible condition and adds a test for another
condition.
2018-07-31 15:13:21 -07:00
Eric Anderson 5878b6ddca CONTRIBUTING.md: Add reference to COMPILING.md
Fixes #4715
2018-07-31 13:49:09 -07:00
Carl Mastrangelo 128f54ca1c
all: update readme to point to 1.14 2018-07-31 12:19:20 -07:00
Eric Anderson 989bc87dda bazel: Remove http_file trick for neverlink
The trick wasn't necessary, as any java_library can mark itself as
neverlink which applies to its dependencies.
2018-07-30 13:23:56 -07:00
Erik Pettersson e520f46984 all: doc(readme) bump versions
Update versions from 1.13.1 to 1.13.2.
2018-07-30 12:51:49 -07:00
Eric Anderson c032abaa3a
travis.yml: Actually trigger coveralls
Previously it was just erroring:
[[: command not found

This has been broken since #3638
2018-07-30 12:44:35 -07:00
Carl Mastrangelo 948439d04c
all: fix bazel build deps for netty 2018-07-30 12:42:33 -07:00
Eric Anderson ed4b5f30f4 netty: Remove option to pass promise to WriteQueue
Passing a promise to WriteQueue was only misused to add a listener on
the promise before issuing the write. Although in this case the listener
ordering will be "random" because listeners are being added from two
different threads, in general we always want to add a listener after the
write returns to let any lower-level listeners be registered first.

Future work can resolve the "random" listener order by passing the
listener to the WriteQueue and adding the listener from the event loop.
2018-07-30 11:34:58 -07:00
Eric Anderson e393b4a1c1 repositories.bzl: Upgrade to Truth 0.42
This was missed in the earlier #4668 and #4664
2018-07-30 11:07:38 -07:00
Eric Anderson 8188a3eb92 gradle: Use config_loc in checkstyle
We previously passed a custom variable to the checkstyle configuration.
In Gradle 4.0 config_loc was added for the same purpose. The default
configDir is $projectDir/config/checkstyle which is different for each
project; we need to override it to always point to the root project.
2018-07-30 10:51:54 -07:00
Eric Anderson 6ef5742b42
gae-interop-testing: Disable special_status_message
The server doesn't support Echo Status.
2018-07-30 09:19:47 -07:00
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
Eric Anderson 75b48b4dfe interop-testing: Add special_status_message test 2018-07-26 14:56:35 -07:00
Eric Anderson d66ba24272 Upgrade Shadow and Animalsniffer plugins
This avoids warnings of Gradle 5 deprecation.
2018-07-26 13:43:50 -07:00
Eric Anderson 94b2618a35 Upgrade Gradle to 4.9
This opens up the ability of dependency locking and the now-stable Maven
Publish Plugin. Also failOnVersionConflict no longer needs to be
commented out for the dependency insight report.
2018-07-26 13:43:50 -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 72179e22a5
grpclb: remove unnecessary support for lb delegation 2018-07-24 13:00:49 -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
Carl Mastrangelo b1c461f8fb
all: buildify repositories.bzl 2018-07-23 17:03:46 -07:00
Eric Anderson 5823fffa4c Upgrade to Truth 0.42
Truth 0.42 brings in some Java 8 bytecode, but they are only in
annotations. So we remove them for gae-java7, otherwise they cause the
build to fail with messages like:

> Unable to stage app: Class file is Java 8 but max supported is Java 7: com/google/auto/value/extension/memoized/Memoized.class in /usr/local/google/home/ejona/clients/grpc-java/gae-interop-testing/gae-jdk7/build/exploded-grpc-gae-interop-testing-jdk7/WEB-INF/lib/auto-value-annotations-1.6.2.jar
> Unable to stage app: Class file is Java 8 but max supported is Java 7: org/checkerframework/dataflow/qual/Pure$Kind.class in /tmpfs/src/github/grpc-java/gae-interop-testing/gae-jdk7/build/exploded-grpc-gae-interop-testing-jdk7/WEB-INF/lib/checker-qual-2.5.3.jar

I manually tested the interop client with Java 7 and it ran without
issue.

This fixes the issues experienced with Truth 0.42 before in #4664.
Related: google/truth#479
2018-07-23 15:53:12 -07:00
Eric Gribkoff 7c83717490
android: include proguard config to keep method names (#4667)
Also deletes some an forwarding method
2018-07-23 15:51:19 -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
Eric Anderson c30e509621 Downgrade to Truth 0.41 for Java 7 support
gae-jdk7 in particular is failing with the 0.42 Truth because it depends
on org.checkerframework:checker-qual 2.5.3 instead of 2.0.0.
2018-07-20 22:30:40 -07:00
Carl Mastrangelo 64d272ae7c
core: make service config errors recoverable 2018-07-20 17:47:03 -07:00
ZHANG Dapeng 8be92a1e0a
interop-testing: Fix clientStreaming interop test does not fail on missing trailers
If the server sends all response message but does not send the trailers, client throws
StatusRuntimeException: INTERNAL: Received unexpected EOS on DATA frame from server
2018-07-20 16:54:33 -07:00
Carl Mastrangelo 7d455964f6
all: update to netty 4.1.27 and tcnative 2.0.12 2018-07-20 16:36:00 -07:00
Eric Anderson 6d7c7dc583 context: Avoid deprecated Truth API
This helps an internal cleanup removing the old failWithRawMessage API.
2018-07-20 14:48:44 -07:00
Eric Anderson 4e276a52f3 buildscripts: Remove set -x from run_in_docker.sh
Printing the commands is pretty ugly output and not particularly
helpful, unless debugging the logic. If needing to debug, just add the
-x locally.
2018-07-20 14:08:07 -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 37e6f5f775
Fix jdk10 support in travis (#4653)
For jdk10: disable errorprone and fix javadoc warnings
2018-07-19 13:35:27 -07:00
Jiangtao Li 499f95d3ec
alts: add call credential security level attribute (#4657) 2018-07-19 10:55:22 -07:00
zpencer 603d858186
buildscript: fix jdk-switcher bug always always setting jdk8 (#4652)
This fixes a bug that always hard codes jdk8.

Fixing this revealed an issue for jdk10, so let's remove jdk10
for now and revisit it in a separate PR.
2018-07-18 11:04:31 -07:00
zpencer 4335445d98
Start 1.15.0 development cycle (#4650) 2018-07-18 10:48:04 -07:00
zpencer f013771bd1
services: binlog status code, msg, details (#4551)
Log these additional bits of info in RPC binary logging
2018-07-17 11:29:45 -07:00
Carl Mastrangelo 146b6006b3
compiler,stub: update RpcMethod docs and usage 2018-07-12 17:01:47 -07:00
zpencer 9925049dce
services: double submit cookie interceptor for channelz (#4628)
Add this form of XSRF protection to channelz. Non web browser clients
calling channelz must also include the cookie header and metadata
key.
2018-07-12 16:45:17 -07:00
Eric Anderson 818d7246c3 RELEASING.md: Remove manual artifact documentation
This greatly reduces the amount of content. The removed content was
already deteriorating. For example, it references grpc-java-deploy which
is no longer present nor necessary. It also didn't suggest using
build_docker.sh for building protoc-artifacts.

While the docs could have been updated, without actually running them
they are unlikely to be functional. Removing the docs seems better than
spending effort of maintaining them, especially since they add confusion
to the process and are a scary amount of content for new devs.
2018-07-12 14:18:11 -07:00
zpencer 3181fbcf03
services: add javadocs for binlog constructors (#4637) 2018-07-12 12:57:10 -07:00
Eric Anderson 7bb88de264 buildscripts: remove grpc-java-releasing docker container
The buildscript was updated to pull in a fix to protoc-artifacts to
support TLS 1.2 (google/protobuf#4879), which was the only remaining
reason to have our own container.

Docker container building was split out into a separate build_docker.sh
so that people can call it blindly and get the container necessary for
run_in_docker.sh.
2018-07-11 13:04:30 -07:00
Eric Anderson 1887b93afd buildscripts: Hard-code PROTOBUF_VERSION in make_dependencies.sh
We always want to use a consistent version of protobuf; avoid the need
for the caller (which may be a person running the script) to specify the
version.
2018-07-11 10:13:09 -07:00
Eric Anderson 4879d6f6a8 buildscripts: Use "all" protobuf download to avoid ./autogen.sh
This cuts ~20 seconds from the build time and avoids the need to have
autoconf and libtool installed. This is the "normal" way to build
protobuf.
2018-07-11 10:12:33 -07:00
jbingham-google ffcb3b964b compiler, stub: Rename inputType and outputType in @RpcMethod 2018-07-10 13:24:50 -07:00
Eric Anderson 32d50eb3b3 netty: Fix regression in Java 9 ALPN support
Enable testing on Java 9+ in TlsTest, to prevent future regressions.

Fixes #4620
2018-07-10 09:14:49 -07:00