aboutsummaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2020-07-24Merge tag 'upstream/v1.16.1' into HEADHadrien Zalek
Update the Java gRPC implementation source to that of a released version (v1.16.1) instead of some intermediate commit after v1.15.0. Test: m grpc-java Bug: 148404241 Change-Id: I9c072aee054a4aecc1bdf39adf45e9a243b907f5
2020-06-03Build the gRPC Java library from sourceHadrien Zalek
Build the library from source since the imported prebuilts are inconsistent and incomplete. For starters, the source is that of version 1.15.0 but the imported jars are those of version 1.14.0. More importantly the grpc-java-protobuf library depends on the grpc-java-protobuf-lite library that is not prebuilt. This causes runtime errors due to missing symbols that should have been caught at compile-time. The Soong build modules follow the upstream Bazel rules as closely as possible. Note that some static libraries were added to the grpc-java to maintain compatibility with other rules that depend on it since the original prebuilt grpc-java-core jar contained all sources under core/ which is not how the library is built using Bazel. Test: m grpc-java Test: Diffed the entries between the old and new jars Bug: 148404241 Change-Id: I060333a68848272d5d9e09c040c1e35451a408c6
2018-10-26Bump version to 1.16.1upstream/v1.16.1Eric Anderson
2018-10-26core: Make MetadataApplier an interface againEric Anderson
Swapping MetadataApplier to an abstract class is not ABI-safe for callers. So I revert back to the previous interface definition and introduce a CallCredentials2.MetadataApplier which is an abstract class. Once everyone is on CallCredentials2 then we can swap it to an abstract class again. Fixes #5002
2018-10-24Bump version to 1.16.1-SNAPSHOTEric Anderson
2018-10-24Bump version to 1.16.0upstream/v1.16.0Eric Anderson
2018-10-24Revert "core: DnsNameResolver caches refresh (#4812)"Jihun Cho
This reverts commit 189991012bbff42b975c51045c32efceaa07f462.
2018-10-22Fix grpc-java targetandroid-wear-8.0.0_r2Julien Desprez
Test: make grpc-java Bug: None Change-Id: I55dc3d537c87c7ffc80b23cdec48fa830e9c87db
2018-10-19core: ignore localhost and IP addresses for JNDI (1.16.x backport)Carl Mastrangelo
This change is mainly to fix a test, but it also is an implementation of the proposal here: https://github.com/grpc/proposal/pull/79 In short: * Do not do SRV or TXT lookups when the target name is `localhost`. This can be overriden by a system property * Do not do SRV or TXT lookups when the target name is an IPv6 or IPv4 address. This _cannot_ be overriden. The constructed domains for these queries would themselves not be valid. (e.g. _grpclb._tcp.192.168.0.1) * Speeds up initial connection when communicating over local host, since it is extremely uncommon that such a connection would need gRPCLB or SRV records I expect to remove the system property after a release if no one asks about it.
2018-10-19core: annotate Attributes key annotations as experimental API. (#4974) (#4977)Kun Zhang
Also annotate NameResolver.Listener as experimental because annotations of an outer class don't show in the javadoc page of its inner classes.
2018-10-17core: throw exception on resolution failure and no jndi resolverCarl Mastrangelo
Backport of #4953 Updates #4951
2018-10-10core: add CallCredentials2 and deprecate CallCredentials' old interface (#4902)Kun Zhang
This is the first step of smoothly changing the CallCredentials API. Security level and authority are parameters required to be passed to applyRequestMetadata(). This change wraps them, along with MethodDescriptor and the transport attributes to RequestInfo, which is more clear to the implementers. ATTR_SECURITY_LEVEL is moved to the internal GrpcAttributes and annotated as TransportAttr, because transports are required to set it, but no user is actually reading them from {Client,Server}Call.getAttributes(). ATTR_AUTHORITY is removed, because no transport is overriding it. All involved interfaces are changed to abstract classes, as this will make further API changes smoother. The CallCredentials name is stabilized, thus we first introduce CallCredentials2, ask CallCredentials implementations to migrate to it, while GRPC accepting both at the same time, then replace CallCredentials with CallCredentials2.
2018-10-06core: ForwardingLoadBalancerHelper (#4911)Kun Zhang
This will be used by LoadBalancer plugins that delegates to another, which is what the new request routing (go/grpc-request-routing-design) requires. This will also be used to wrap LoadBalancers to add client-side health-checking functionality.
2018-10-03core: add Grpc.TRANSPORT_ATTR_LOCAL_ADDR (#4906)Kun Zhang
Resolves #4135
2018-10-03core: name anonymous classes in ManagedChannel for clear stacktracesCarl Mastrangelo
2018-10-02Start adding Soong build files for grpc-grpc-javamaster-cuttlefish-testing-releaseJulien Desprez
Add basic build files for the grpc-java modules. Still need to be added: netty, protobuf Test: make Bug: None Change-Id: I9248dd23c0ec24ec0f9a15aa6f6d826b7b90d617
2018-10-01doc: organize Attributes with annotations. (#4892)Kun Zhang
* doc: organize Attributes Keys with annotations. Keys are annotated with the following annotations: 1. Grpc.TransportAttr: transport attributes returned by {Client,Server}Call.getAttributes(). 2. NameResolver.ResolutionResultAttr: attributes passed as the argument of NameResolver.Listener.onAddresses() and LoadBalancer.handleResolvedAddressGroups() 3. EquivalentAddressGroup.Attr: attributes from EquivalentAddressGroups. * Expand the usage of annotations to Attributes variables.
2018-09-28core: permanently store authority at channel creation (#4886)zpencer
Getting the authority must not rely on the name resolver being non-null, because that can trivially happen if the channel is shut down.
2018-09-28Upgrade to Guava 26.0-android and jsr305 3.0.2Jesse Wilson
2018-09-27core,services: v1 binlog (#4846)zpencer
Log using new proto definition - Remove io.grpc.BinaryLog.CallId because a call ID is now an AtomicLong - Add the concept of "always included" and "never included" metadata keys. This is needed because grpc-status-details-bin is already logged in the binlog msg, and we will log grpc-trace-bin for the census info. - unit tests are effectively rewritten
2018-09-19core: fix channelz import on AutoConfiguredLoadBalancerFactorySpencer Fang
The original PR was stale when merged.
2018-09-19core: channel tracing to log lb policy changesZHANG Dapeng
2018-09-14all: use Java7 bracketsCarl Mastrangelo
2018-09-12core: remove redundant SubchannelPicker refreshes in RoundRobinLoadBalancerNick Hill
* Remove redundant SubchannelPicker refreshes in RoundRobinLoadBalancer - Ensure active subchannel list and round-robin index is only regenerated/refreshed when it changes - Make it so that Subchannels exist in subchannels map iff their state != SHUTDOWN - Add EmptyPicker class since logic for this case is disjoint from the non-empty case * remove explicit initialization of boolean ready field per @carl-mastrangelo's review comment * minor restructuring to make logic clearer; more explanatory comments * move some checks inside updateBalancingState method for clarity * store current state and picker in RRLB, only update when new one is diff * some more simplification/refactoring; improve test coverage - remove now redundant check in handleSubchannelState - collapse getAggregatedState() and getAggregatedError() into handleBalancingState() - have both pickers extend new RoundRobinPicker, move areEquivalentPickers() logic into RoundRobinPicker.isEquivalentTo() - extend unit tests to cover some additional cases * Address latest review comments from @zhangkun83 - Use explicit check for non-empty list instead of assert - Change EmptyPicker.status to be non-nullable - Further test coverage improvement including explicit picker comparison tests * use EMPTY_OK instead of Status.OK for initial empty picker
2018-09-11all: fix lint warnings in importZHANG Dapeng
2018-09-10core, services: remove census from binary logs (#4845)zpencer
The exact census span behavior wrt gRPC is not yet defined, so let's punt on tight integration. It may be fine to log grpc-trace-bin on server side because it is a key visible to the application.
2018-09-06core: DnsNameResolver caches refresh (#4812)creamsoup
DnsNameResolver caches refresh using java security property networkaddress.cache.ttl. Resolves #4745
2018-09-05all: prepend internal classes with Internal (#4826)zpencer
This is a safer way to hide the classes, because they will not appear in public targets for some build configurations.
2018-09-04all: move Channelz to io.grpc as InternalChannelz (#4797)zpencer
This is an API used to coordinate across packages and must live in `io.grpc`. Prepending `Internal` makes it easier to detect and hide this class from public visibility when using certain build tools. fixes #4796
2018-08-30skip populating trace header if no census impl is available. (#4805)creamsoup
2018-08-28core: make HedgingPolicy finalZHANG Dapeng
Just as RetryPolicy is final.
2018-08-27core: switch to Java 7 source and bytecode (#4801)Eric Gribkoff
javac can produce code that invokes Object.requireNonNull when instantiating an inner class using a instance variable. See https://bugs.openjdk.java.net/browse/JDK-8202137
2018-08-27Start 1.16.0 development cycle (#4803)Kun Zhang
2018-08-27all: Swap to Java 7 source and bytecodeEric Anderson
Core and OkHttp are left with Java 6 for the moment. Once we resolve their issues they could be bumped as well. Updates #3961
2018-08-23core: plumb hedging policyZHANG Dapeng
This is only API plumbing for hedging, following exactly the same way as its retry counterpart, so it is almost trivial.
2018-08-20core: minor cleanup of NameResolverProviderCarl Mastrangelo
* Make the list of providers an immutable List * Make obvious that the list is statically initialized * Add documentation for when methods were added. * Use RuntimeException, rather than IllegalStateException.
2018-08-17core: add ability to create stackless status exceptionsCarl Mastrangelo
2018-08-16core: Handle null ProxySelector (#4762)zpencer
ProxySelector.getDefault() can return null Fixes #4677
2018-08-13Fix errror message when DNS name is invalid. (#4751)creamsoup
It used to throw NPE, since URI.create creates URI with null hostname. Now it thorws IllegalArgumentException for invalid DNS name, NPE for null name.
2018-08-13core: Avoid implicit requestConnection in PickFirstEric Anderson
This makes the behavior more clear.
2018-08-09core: fix unused variable lintSpencer Fang
2018-08-09all: update animalsniffer to Java 7 and add Android 14 (#4727)Eric Gribkoff
2018-08-06core: revert warning about `Status.asException(null)`Carl Mastrangelo
There seem to be some users converting from StatusRuntimeException to StatusException using the following paradigm: sre.getStatus().toException(sre.getTrailers()) Since there isn't a viable alternative, revert the warning.
2018-08-03core: remove unused fullMethodName field from CensusStatsModule. (#4731)Kun Zhang
2018-08-02inprocess: prevent null names, and define socket address equalityCarl Mastrangelo
2018-08-02Encourage using grpc-netty-shaded instead of grpc-nettyEric Anderson
grpc-netty is still really useful, but for most users who aren't doing anything advanced using grpc-netty-shaded is much safer from a dependency basis. grpc-netty-shaded has seen more usage and has shown itself to be stable and reduce the number of conflicts due to Netty versions.
2018-08-01core: initialize round robin load balancer picker to random index (#4462)Tom Leach
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-07-31all: add tracking issues for all experimental APIs and make it requiredCarl Mastrangelo
Additionally, make Status*Exception.getTrailers() non experimental
2018-07-27core: stabilize Status Exceptions API, and warn on null trailers in StatusCarl Mastrangelo
2018-07-27core: add flags for selectively enabling grpclbCarl Mastrangelo