Skip to content

Releases: grpc/grpc-java

v1.63.0

05 Apr 19:50
Compare
Choose a tag to compare

API Changes

  • xds: Stabilize CsdsService (#11003) (0d749c5)
  • api: Stabilize server.getListenerSockets (#10910) (ff34d51)
  • servlet: Introduce ServletServerBuilder.buildServlet(#10921) (257d1c2)
  • api: Allow configuration of the queued byte threshold at which a Stream is considered not ready (#10977) (2c83ef0)

New Features

xds, dual stack, happy eyeballs: Support dual stack in xds, change list includes:

  • Enable new PickFirst lb policy by default. The new PickFirst implements subchannel picking logic. (#11002) (8a9ce99)
  • EDS resource now supports additional addresses (#11011) (38f968f)
  • Change address based outlier detection to endpoint based (#10939) (c61fe69)
  • Enable Happy Eyeballs by default (#11022) (51f811d)

Improvements

  • rls: Adding extra debug logs (#10902) (eba699a)
  • binder: Add missing Android API annotations (#10841) (ce2adcc)
  • core: Provide DEADLINE_EXCEEDED insights for context deadline (3abab95). When the deadline triggered and the deadline was set on the RPC via the stub or CallOptions, gRPC would gather additional debugging information to help understand where the RPC took so long. However if the deadline came from io.grpc.Context the error was simply “context timed out.” Now the debugging information is provided in both cases
  • examples: Fix file paths in debug example README (e19f1f1)
  • compiler: implement ability to skip generation of javax annotation (#10927) (0d39c2c). Pass the option jakarta_omit to protoc-gen-grpc-java when generating code
  • xds: Get rid of xDS v2 proto dependencies (#10968) (feab4e5). grpc-xds jar size has decreased by 35%.
  • xds: Support retrieving names from wrapped resource containers (#10975) (867e469)
  • netty: improve server handling of writes to reset streams (#10258) (a68399a)
  • api: Fix a typo in ServerInterceptor JavaDoc (#10990) (0b82f01)
  • servlet: Check log fine level before hex string conversion. (#11038)
  • auth: Specify a locale for upper/lower case conversions (1.63.x backport) #11050

Bug Fixes

  • xds: Copy data in least request to avoid picker data race (f4cc166). This fixes a possible regression introduced in 1.60.0. Auditing the buggy code showed it unlikely to cause problems in practice, but that was more by happenstance than by design
  • xds: Fix data race in the xds client that contacts the control plane (d7628a3)
  • rls: Fix a local and remote race (aa90768). The remote race could cause an RPC to hang until its deadline. It had been seen in practice when the client was severely CPU under-provisioned
  • xds: Fix xdsNameResolver virtual host lookup authority with xdstp style names. Use service authority instead of ldsResourceName (#10960) (78b3972)
  • core: Fix retry race condition that can lead to double decrementing inFlightSubStreams and so miss calling closed (#11026) (#11033)
  • okhttp: Fix OkHTTP client transport leak (#11060)
  • xds: Use empty string when disabling server hostname verification ( #11058)

Dependencies

  • Upgraded google-auth-library-java to 1.22.0

Acknowledgement

Alex Panchenko
Benjamin Peterson
David Ankin
Prashanth Swaminathan
Touko Vainio-Kaila

v1.62.2

26 Feb 23:39
Compare
Choose a tag to compare

gRPC Java 1.62.2 Release Notes

Note that this is the initial 1.62.x release

API Changes

  • services: Remove io.grpc.services.BinaryLogs, which was deprecated since 2021. io.grpc.protobuf.services.BinaryLogs should be used instead (#10832).
  • Allow users outside of io.grpc.xds package to create custom xDS resources (#10834) (6d96e65)

New Features

  • api:Add ClientTransportFilter. Similarly to ServerTransportFilter, this will provide an observability hook and it allows direct modification of the transport's attributes. (#10646)

Improvements

  • java_grpc_library.bzl: Add support for Auto Exec Groups (cb03bd2). This is mostly a behind-the-scenes change to adjust to the newer way Bazel operates
  • java_grpc_library.bzl: Support runfiles for protoc and the plugin (65a6b3b). Neither binary uses runfiles, but the task will be ready if they need to in the future
  • xds: Add EC key support for XdsChannelCredentials/XdsServerCredentials (100d5a5)
  • binder:Change log level from WARNING to FINER for expected exception during close with error, to reduce log spamming (#10899) (7ba0718)

Bug Fixes

  • xds: Fix a bug in WeightedRoundRobinLoadBalancer policy that could raise NullPointerException and further cause channel panic when picking a subchannel. This bug can only be triggered when connection can not be established and the channel reports TRANSIENT_FAILURE state. (#10868)

Dependencies

  • The protoc plugin no longer supports macOS Big Sur (macOS 11). Binaries are now built using Monterey (macOS 12)

Acknowledgements

v1.61.1

02 Feb 21:33
Compare
Choose a tag to compare

Bug Fixes

xds: Fix a bug in WeightedRoundRobinLoadBalancer policy that could raise NullPointerException and further cause channel panic when picking a subchannel. This bug can only be triggered when connection can not be established and the channel reports TRANSIENT_FAILURE state. (#10868)

v1.60.2

02 Feb 21:26
Compare
Choose a tag to compare

Bug Fixes

xds: Fix a bug in WeightedRoundRobinLoadBalancer policy that could raise NullPointerException and further cause channel panic when picking a subchannel. This bug can only be triggered when connection can not be established and the channel reports TRANSIENT_FAILURE state. (#10868)

v1.61.0

12 Jan 04:49
Compare
Choose a tag to compare

API Changes

  • Remove unused experimental API ManagedChannelBuilder.enableFullStreamDecompression (#10744)
  • api: Deprecate LoadBalancer.EMPTY_PICKER added in 1.58.0 in favor of FixedResultPicker (860b5cb)

New Features

  • binder: Experimental support for asynchronous security policies (#10566)

Improvements

  • core: reduce CompositeReadableBuffer allocation (#3279)
  • core: Improve error message clarity when a channel leak is detected (201893f)
  • util: use shared index across round_robin pickers (dca89b2). This makes its implementation more similar to weighted_round_robin.
  • xds: Implement ADS stream flow control mechanism (#10674). This limits the maximum memory consumed if the control plane sends updates more rapidly than they can be processed.

Bug Fixes

  • core: Check outbound maximum message size for the compressed size in addition to the already-checked uncompressed size (#10739). Fixed the status code to be RESOURCE_EXHAUSTED instead of UNKNOWN.
  • util: Fix NPE when multiple addresses are in an address group for petiole load balancer policies (#10769)
  • util: Disable publishing of fixtures (8ac43dd). The Gradle test fixtures are for use by grpc-java's internal tests.
  • okhttp: Ignore known conscrypt socket close issue (#10812). This stops an exception from being thrown when a known Conscrypt synchronization issue happens.

Dependencies

  • Drop support for Bazel 5 (55a9c01). Bazel 7 is available, and Protobuf has already dropped support for Bazel 5.
  • Change many compile deps to runtime deps (d6830d7). This reduces the transitive classes "leaked" into the compile classpath. In particular, grpc-core (io.grpc.internal) will be less frequently included transitively at compile time.
  • Upgrade dependencies (c985797)
    • Protobuf to 3.25.1
    • auto-value-annotations to 1.10.4
    • error_prone_annotations to 2.23.0
    • proto-google-common-protos to 2.29.0
    • google-cloud-logging to 3.15.14
    • guava to 32.1.3-android
    • okio to 3.4.0

Acknowledgements

v1.60.1

21 Dec 20:26
Compare
Choose a tag to compare

Bug Fixes

  • util: Fix NPE when multiple addresses in an address group for petiole load balancer policies (#10770)

v1.58.1

15 Dec 18:24
Compare
Choose a tag to compare
  • xds: PickFirst was not receiving its configuration so it used the default configuration which meant that randomize was ignored.

v1.60.0

05 Dec 18:17
Compare
Choose a tag to compare

API Changes

  • api: Stabilize ForwardingServerBuilder, ForwardingChannelBuilder2, and ForwardingChannelBuilder. Note that ForwardingChannelBuilder is stabilized (no changes will be made to it), but immediately deprecated in favor of ForwardingChannelBuilder2. (#10586)
  • api: Deprecate ForwardingChannelBuilder.delegate(). De facto this deprecates the class itself, since all classes extending ForwardingChannelBuilder implement the delegate() method. See javadoc for details (#10587)
  • api: Changed recently-introduced LoadBalancer.acceptResolvedAddresses() to return Status instead of boolean (#10636). This is part of continued work to align the LB API cross-language and API stabilization
  • stub: Deprecate StreamObservers (#10654)
  • alts: AltsChannelBuilder now extends ForwardingChannelBuilder2 (#10587)
  • protobuf: Stabilize ProtoUtils.metadataMarshaller() (#10628)
  • protobuf-lite: ProtoLiteUtils experimental comment (#10627)

Behavior Changes

  • core: ManagedChannels now check the address types provided by the nameResolver (for the given target) with the address types supported by the channel transport and generate an error in case of mismatch. That dramatically improves the error message when an issue occurs
  • core: When a server stream is closed due to user's code (an uncaught exception in halfClosed, messagesAvailable, onReady callback of a ServerStream's listener), the Status.UNKNOWN returned to the client will have Application error processing RPC description. Previously the description was empty. This is helpful to differentiate between server errors originated in user application, gRPC library, or even those injected by a proxy. (#10643)
  • xds: Log ORCA UNIMPLEMENTED error to subchannel logger. This removes them from the normal application logs, reducing log spam

Improvements

  • Change the underlying implementations of RingHash, RoundRobin, WeightedRoundRobin and LeastRequest load balancers to utilize the pick first load balancer rather than directly manage subchannels. This should only be noticeable if it introduced a bug
  • core: Avoid flushing headers when the server returns a single response (#9314). This is a performance optimization to reduce the number of packets for non-streaming responses
  • util: Make grpc-core an implementation dependency. This will prevent the io.grpc.internal classes in grpc-core from being visible during compilation when depending on just grpc-util
  • netty: Implement Http2Headers.isEmpty(). This fixes compatibility with Netty 4.1.101.Final.
  • netty: Add NettyServerBuilder.maxRstFramesPerWindow(). This can be used to limit impact of Rapid Reset
  • netty: Disable huffman coding in headers (#10563). Huffman coding provides modest compression for relatively high CPU usage, especially within a data center. Rely just on the HPACK static and dynamic tables for compression, for higher performance. This only impacts header values 512 bytes or longer, as Netty already disabled Huffman for smaller values
  • alts: Improve handshake failure error message by propagating original exception (#10644)

Bug Fixes

  • util: Remove shutdown subchannels from OD tracking (#10683). This could have caused a memory leak on a long-lived channel. But we don’t think it could be triggered with our built-in load balancing policies.

Dependencies

  • Bump Netty to 4.1.100.Final

Acknowledgements

@anthonyjpratti
@fedorka
@jpd236
@mateusazis
@pkoenig10
@yannickepstein
@amirhadadi

v1.59.1

28 Nov 16:17
Compare
Choose a tag to compare
  • netty: Implement Http2Headers.isEmpty(). This fixes compatibility with Netty 4.1.101.Final.
  • netty: Add NettyServerBuilder.maxRstFramesPerWindow(). This can be used to limit impact of Rapid Reset
  • xds: Log ORCA UNIMPLEMENTED error to subchannel logger. This removes them from the normal application logs, reducing log spam

v1.59.0

20 Oct 18:12
Compare
Choose a tag to compare

gRPC Java 1.59.0 Release Notes

PLANNED ABI BREAKAGE!

This breaks the ABI of the @ExperimentalApi classes listed below.
This does not impact source code (API); it only impacts code compiled with a different version of gRPC than it runs with (ABI).

Users that recompiled their code using grpc-java v1.36.0 (released on Feb 23, 2021) and later, ARE NOT AFFECTED.
Users that compiled their source using grpc-java earlier than v1.36.0 may need to recompile when upgrading to grpc-java v1.59.0.

See details in #10406.

Affected classes

Class io.grpc.internal.AbstractManagedChannelImplBuilder is deleted, and no longer in the class hierarchy of the channel builders:

  • io.grpc.netty.NettyChannelBuilder
  • io.grpc.okhttp.OkhttpChannelBuilder
  • io.grpc.cronet.CronetChannelBuilder

Class io.grpc.internal.AbstractServerImplBuilder is deleted, and no longer in the class hierarchy of the server builders:

  • io.grpc.netty.NettyServerBuilder
  • io.grpc.inprocess.InProcessServerBuilder

API Changes

  • core: AbstractManagedChannelImplBuilder and AbstractServerImplBuilder are removed (#10530). This is ABI-breaking, see the warning above. (#10406)
  • core: Removed .class file hack previously introduced in v1.36.0 to ease removal of internal ABIs. (#10406)
  • api: Add ForwardingChannelBuilder2, an ABI-safe version of ForwardingChannelBuilder, which will be deprecated in the following release. (#10585, #10406)
  • api: Add LoadBalancer.FixedResultPicker convenience class for load balancer implementations. It is a replacement for ErrorPicker and EMPTY_PICKER added in 1.58.0
  • testing: Stabilize TestMethodDescriptors (#10530)

Behavior Changes

  • core: de-expermentalize pick first config parsing (#10531)
  • netty: Respect -Dio.netty.allocator.type=unpooled when getting Netty Allocator instead of ignoring it (#10543)
  • netty: Use UNAVAILABLE for connections closed while writing. Previously this would result in UNKNOWN
  • binder: Enable indirect addressing using s. (#10550)

Improvements

  • core: only use reflection to resolve InternalCensusStatsAccessor once instead of once per channel
  • core: enhance error message in the case of DEADLINE_EXCEEDED to indicate name resolution delay.
  • netty: When creating a connection, use java.util.logging formatting instead of String.format to avoid work when not logged
  • netty: Touch ByteBuf when message framing has been decoded. If the buffer is leaked, this helps narrow down the source of reference counting bug
  • java_grpc_library.bzl: Disable Automatic Exec Groups inside grpc libraries (#10514). This improves compatibility with future Bazel versions while retaining Bazel 5.x compatibility

Bug Fixes

  • netty: Avoid NettyAdaptiveCumulator incorrectly releasing its input ByteBuf twice when reading messages under certain error conditions (#10537)
  • xds: Add fix for xdstp replacement for percent-encoded authorities (#10571)

Documentation

  • API documentation (Javadoc) for Server and Channel builders now correctly displays inherited methods and the class hierarchy. (#10406)
  • examples: add an example for OAuth (#10560)

Dependencies

  • Upgrade Netty to 4.1.97.Final

Acknowledgements

John Cormie (@jdcormie)
Stephane Landelle (@slandelle)
@kotlaja