Releases: grpc/grpc-java
Releases · grpc/grpc-java
v1.56.0
API Changes
- api: Stabilize the
SynchronizationContext
class (#10130). - api: Stabilize
io.grpc.CallCredentials
(#10208, #10211).thisUsesUnstableApi()
is@Deprecated
and has a default implementation.CallCredentials
implementations should delete their implementation or remove@Overrides
, as the method will be deleted in the future. - api: Stabilize the
ProxyDetector
hierarchy andManagedChannelBuilder.proxyDetector
method.
Behavior Changes
- core: Sticky
TRANSIENT_FAILURE
inPickFirstLoadBalancer
(#10106). See gRFC A62. If it can't connect, pick-first will now immediately fail RPCs until after it successfully connects. RPCs will no longer be delayed while it performs those attempts, which previously could cause significant (error) latency. It now also performs reconnect attempts after failure and backoff without prompting; previously it required an RPC to trigger the reconnect.ManagedChannel.idleTimeout
(defaults to 30 minutes) still applies and forces the channel idle after a period of no RPCs. - stub: Add a null check for
responseObserver
into the methods for initiating a call that takes aresponseObserver
argument. This ensures a fail fast with a clearer cause instead of an NPE when the observer is first used. - xds: Flip default for RLS being enabled to true for XDS (#10248) (#10252). If there are no RLS configurations in your XDS or you already enabled it with the environment variable this will have no effect. To disable it, set the flag
GRPC_EXPERIMENTAL_XDS_RLS_LB
to false. - xds: Rename
weighted_round_robin_experimental
LB Policy toweighted_round_robin
(#10162).
New Features
- protobuf,protobuf-lite: Allow to configure protobuf recursion limit (#10094).
- core: Optional address shuffle in
PickFirstLoadBalancer
(#10110). - xds:
pick_first
LB configuration (#10181).
Improvements
- xds: Add
error-per-second
in weight formula for client-side WRR (#10177). - xds: Use
application_utilization
and fallback tocpu_utilization
if unset in weight formula for client-side WRR. (#10256). - bazel: The README now mentions Bazel and where to find the example. (#10217).
Bug Fixes
- binder: Handle unexpected exceptions on binder threads. (#10092.
- android,binder,cronet:
.aar
file when publishing. (#10138). - api: Fix boundary check in
Status.fromCodeValue()
. (#10155). - core: Don't use system Locale for content-type matching. (#10097).
- okhttp: Fix signed-byte comparison in server when checking for ASCII in header (#10151). Without fix, authority could contain utf-8.
Dependencies
- Version pinning (e.g.,
[1.56.0]
instead of1.56.0
) has been removed from POMs, for both Netty and gRPC dependencies. The pinning was unreliable in Maven and ignored in Gradle, yet caused downloads during the build to fetch the version list. For a while we've had a BOM that helps reduce version skew. (#10175). - bazel: Add java toolchain type to all rules using
java_common
. (#10225). - Upgraded
netty-tcnative-boringssl-static
ingrpc-netty-shaded
to 2.0.61.Final (#10260). Netty itself was not updated. - Upgraded AndroidX Annotation to 1.6.0 (#10178).
- Upgraded AndroidX Core to 1.10.0 (#10178).
- Upgraded AndroidX Lifecycle-Common to 2.6.1 (#10178).
- Upgraded OpenCensus to 0.31.1 (#10178).
- Upgraded Cronet API to 108.5359.79 (#10178).
- Upgraded
proto-google-common-protos
to 2.17.0 (#10178). - Upgraded Gson to 2.10.1 (#10178).
- Upgraded PerfMark API to 0.26.0 (#10178).
- Upgraded RE2/J to 1.7 (#10178).
Acknowledgements
v1.55.1
The 1.55.0 release failed. There were no artifacts published for it.
API Changes
- services: Rename
MetricRecorder.setQps
/clearQps
tosetQpsMetric
/clearQpsMetric
(#10031)
Behavior Changes
- gcp-observability: Remove monitored resource detection for logging (#10020). The cloud libraries will fill in these details instead
- protoc-gen-grpc-java: binaries for Linux ARM and PPC are now built using Ubuntu 18.04. They will no longer work on Ubuntu 16.04 and Debian 9
New Features
- api: Stabilize the frequently used compression APIs (#9942):
CallOptions.withCompression
,CallOptions.getCompressor
,AbstractStub.withCompression
,ServerCall.setCompression
,ServerCall.setMessageCompression
- api: Stabilize
Detachable
andHasByteBuffer
- gcp-observability: Stabilize
GcpObservability
(#10024). The GcpObservability API provides a simple way to export logging, tracing, and metrics to Google Cloud Operations. See the Google Cloud blog post. - census: Add new tracer annotation to indicate the time when name resolution completed for those RPCs that experienced name resolution delay, or the time when picking subchannel completed for those RPCs that experienced picking subchannel delay. (#10014, #10044)
- protoc-gen-grpc-java: binary for s390x is now published (#9455). The glibc version used is available in Ubuntu 20.04, Debian 11, and CentOS 9 and later
- authz: Added
FileWatcherAuthorizationServerInterceptor
(#9775) - services: Added
OrcaMetricReportingServerInterceptor.create(MetricRecorder)
which adds common metrics per-RPC (#9902) - android: Add
UdsChannelBuilder
for using LocalSocket an Android (#8418) - alts: Observe the
GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES
environment variable user to adjust the max number of concurrent ALTS handshakes (#10016) - binder: Expose client identity via
PeerUid
andPeerUids
(#9952) - binder: Add
BindServiceFlags.setAllowActivityStarts()
forBIND_ALLOW_ACTIVITY_STARTS
added in Android U (#10008)
Bug Fixes
- core: Fix NPE race during hedging (#10007), fixing a Netty buffer memory leak for cancelled RPCs
- core: Allow transparent retries after a retry attempt and the configured max retries was 1 (#10066)
- okhttp: properly implement
OkHttpServerBuilder.maxConnectionAgeGrace()
(#9968) - xds: Enable federation support. See gRFC A47
- xds: Enable Weighted Round Robin LB policy support. See gRFC A58
- xds: Avoid ClassCastException if the control plane changes the top-level policy (#10091). This is expected to be unlikely, but is possible
- xds: Fix
java.util.NoSuchElementException: SecurityProtocolNegotiators$ClientSdsHandler#0
(#10118). This error did not cause any problems, other than unnecessary logging - xds: Avoid using the default locale for case insensitive path matching (#10148)
- googleapis: Enable ignore_resource_deletion for
google-c2p:
resolver’s default xds bootstrap (#10121) - rls: Refresh name resolution on rejected addresses (#10032)
New Examples
- Keepalive (#9956)
- Cancellation (#9962)
- Deadline (#9958)
- Using waitForReady (#9960)
- Client and Server sharing (#9969)
- Reflection (#9955)
- Doing debug (#9957)
- Health service (#9991)
- Error details (#9997)
- Custom load balancing (#9951)
- gRPC-level reverse proxy (#10059)
Dependencies
- protobuf-java and protobuf-java-util upgraded to 3.22.3 (#10045)
Acknowledgements
v1.54.1
Bug Fixes
- core: Fix NPE race during hedging (#10046), fixing a Netty buffer memory leak for cancelled RPCs
Behavior Changes
- gcp-observability: Remove monitored resource detection for logging (#10026). The cloud libraries will fill in these details instead
API stabilizations
- Stabilize GcpObservability (#10027)
- The GcpObservability API provides users with a simple way to export logging, tracing, and metrics to Google Cloud Operations. For more information, please see this blog post.
v1.50.3
v1.54.0
New Features
- xds: Add weightedRoundRobin LB policy. The WRR policy allows picking the subchannel by weight based on the metrics feedback from the backend using ORCA API. See gRFC A58: Weighted Round Robin LB Policy. (#9873)
- census: Add per call latency metric which is latency across all attempts (#9906)
- Generated code now has an interface named
AsyncService
that the<service-name>ImplBase
class implements. This allows you to provide your own base class when used with the static<service-name>Grpc.bindService(AsyncService)
method(#9688).
Examples
- Add examples for gcp observability (#9967)
Bugfixes
- rls:Fix throttling in route lookup where success and error metrics had been inverted (b/262779100) (#9874)
- protobuf: update external javadoc link (#9890)
- core: fix outlier detection default ejection time (#9889)
- xds: deletion only to watchers of same control plane (#9896)
- api: Target scheme is now properly case insensitive (#9899).
NameResolverProvider
s, however, are expected to return the scheme used for registration in lower-case - api: ForwardingServerCall now forwards getMethodDescriptor(). Previously only SimpleForwardingServerCall forwarded the method
Behavior Changes
- xds:Allow a cluster’s sum of weights to exceed the maximum signed integer up to a limit of max unsigned integer (#9864)
- grpclb: no SRV lookup for "metadata.google.internal."
Improvements
- xds, orca: Allow removing OobLoadReportListener from a subchannel in OrcaOobUil. (#9881)
- services: ORCA API change to allow recording QPS in MetricRecorder and CallMetricRecorder. (#9866)
- Move name resolution retry from managed channel to name resolver (take #2) (#9812)
- Rename AbstractXdsClient to ControlPlaneClient (#9934)
- all: fix build with errorprone 2.18 (#9886)
- build: allow Java 11+ to use modern error prone
- errorprone: enable UnnecessaryAnonymousClass (#9927)
- core: add logger to OutlierDetectionLoadBalancer (#9880)
- census: add trace annotation to report received message sizes (#9944)
- gcp-observability: emit latency and payload size metrics by default when monitoring is enabled (#9893)
- gcp-observability: add trace information like TraceId and SpanId in logs for log correlation when both logging and traces are enabled (#9963)
- gcp-observability: close() will take longer, to ensure metrics and traces are flushed (#9972)
- gcp-observability: update status code type in logs to Google RPC code instead of an integer (#9959)
- gcp-observability: retain default opencensus-task identifier even when custom labels are specified in the configuration (#9982)
- Build Improvements (#9855)
- Fixes MethodDescriptor java documentation (#9860)
- api: forward getSecurityLevel on PartialForwardingServerCall (#9912)
- Updating ServerInterceptors.java to support different marshallers for Request and Response messages. (#9877)
API stabilizations
- Stabilize method ServerBuilder.intercept which had previously been marked experimental. (#9894)
- api:stabilize offloadExecutor usage in ManagedChannelBuilder and NameResolver. (#9931)
Dependencies
- netty:Upgrade Netty from 4.1.79 to 4.1.87, tcnative from 2.0.54 to 2.0.56 (#9784)
- gcp-observability: Transitive gRPC components now have the same gRPC version
- gcp-observability : Google cloud logging updated to 3.14.5
Acknowledgements
@benjaminp
@s-matyukevich
@Faqa
@antechrestos
@carl-mastrangelo
@ioanbsu
v1.53.0
New Features
- googleapis: Allow user set c2p bootstrap config (#9856)
- xds: Add contain and stringMatcher in
RouteConfiguration
(#9845) - core: Add
grpc-previous-rpc-attempts
to the initial response metadata (#9686) - servlet: Implement gRPC server as a Servlet (#8596)
- authz: Implement static authorization server interceptor (#8934)
Examples
- servlet: Add servlet example (#8596)
Bug Fixes
- xds: Update xds error handling logic. Specifically:
- core: Delay retriable stream master listener close until all sub streams are closed. This fixes the call executor lifecycle and prevents potential
RejectedExecutionException
. (#9754) - core: Free unused
MessageProducer
inRetriableStream
(#9853), fixing a Netty buffer memory leak for cancelled RPCs - api: Fail with
NullPointerException
when a Metadata.Marshaller returns null bytes (#9781). This would previously cause aNullPointerException
later during the RPC. Now the return value of the Marshaller is checked immediately, to help find the broken Marshaller
Behavior Changes
- xds: Disallow duplicate addresses in the RingHashLB. (#9776)
- xds: EDS weight sums are allowed up to max unsigned int (was max signed int) (#9765)
- xds: Drop xds v2 support (#9760)
Dependencies
- JUnit upgraded to 4.13.2
- bazel: Dropped support for Bazel 4. We track the two most recent major versions of Bazel, Bazel 5 and 6. Bazel 4 may still work, but we are no longer testing it
- bazel: Include Tomcat annotations dependency for
@Generated
as used by autovalue (#9762). Necessary for building xds and rls on Java 9+ - bazel: Export deps from Maven Central-specific stand-in targets (#9780). Some Maven Central artifacts are a combination of multiple Bazel targets, like grpc-core is composed of //core:inprocess, //core:internal, //core:util, //api. There is a “//core:core_maven” target used by maven_install that uses the other targets. Previously the target used
runtime_deps
to discourage their use by Bazel users, but that could cause compilation failures from lack of hjars. These targets now useexports
Acknowledgement
@cpovirk
@niloc132
@stephenh
@olderwei
@pandaapo
@Panxuefeng