Skip to content

Releases: grpc/grpc-java

v0.14.1 Release

24 Jun 23:38
Compare
Choose a tag to compare
  • Update Netty to v4.1.1.Final, which is the first stable release we've released with. gRPC-java v0.14.0 was already compatible with Netty v4.1.1. This fixes cancellation causing Channel to black hole received data and fixes a DoS bug in renegotiation when using OpenSSL-based tcnative (BoringSSL not impacted).
  • The Netty version bump also supports the "fat" tcnative-boringssl-static JAR that has binaries for all platforms. Simply depend on 1.1.33.Fork17 without any OS-specific classifier
  • Reworked shutdown handling for OkHttp. Fixes "IllegalStateException: Listener is still attached to activeTransport. Seems transportTerminated was not called."

v0.14.0 Release

02 May 18:31
Compare
Choose a tag to compare

New Features:

  • It is now possible to use JSON-encoded protobufs.
  • ClientCall can now be passed in cancellation details.
  • Both Client and Server interceptors can now work in reverse order. See interceptForward().
  • Stubs can now parse messages using an ExtensionRegistry.
  • Server now has a getPort() method.
  • Generated code now includes the version it was built at.
  • Added more info for call cancellation.
    • It is now possible to tell if a call was cancelled client side vs. server side.
  • CallOptions now uses Attributes for affinity routing.
  • Added CallStreamObserver and ServerCallStreamObserver as specialized Stub observers.
  • CallOptions and stubs now uses Deadline instead of a long of nanoseconds.

Major bugs fixed:

  • Fixed a memory leak involving TransportSets.
  • Netty based transports now shutdown upon GOAWAY.
  • DNS Resolution is retried on error.

Other Changes:

  • The grpc-all release artifact no longer repackages source and classes from other grpc artifacts, and instead depends on them
  • Statuses and their exceptions now have a lot more detail about where they came from.
  • Split Protobuf into Protobuf-lite specific parts.
  • Status messages now use a URL encoding for messages.
    • It is now possible to send newlines as well as non-ASCII charcacters in Status messages.
  • Stubs now use an an abstract base class, which allows for easier stub binding.

v0.13.2 Release

10 Mar 21:37
Compare
Choose a tag to compare
  • Updates to Netty 4.1.0.CR3, which allows using netty-tcnative-boringssl-static 1.1.33.Fork14 which does not give a warning about executable stacks. All users of netty-tcnative must update to Fork14 due to a method signature change in tcnative
  • Fixes a bug in the Netty transport when handling GOAWAY that would cause all new RPCs on a Channel to fail until all preexisting RPCs completed. The new RPCs would fail with a message similar to "Cannot create stream 5 since this endpoint has received a GOAWAY frame with last stream id 3"
  • Fixes a deadlock when using the InProcess transport

v0.13.1 Release

23 Feb 00:42
Compare
Choose a tag to compare

This release contains a single fix (103d3d1) to avoid an out-of-order headers bug impacting Netty-4.1.0.CR1. The bug manifests when starting multiple RPCs simultaneously as an opaque error before receiving any responses or the RPC never receiving any response or status. If an RPC was successful then it was not impacted

v0.13.0 Release

18 Feb 20:50
Compare
Choose a tag to compare

New and Notable:

  • Support netty-tcnative-boringssl-static, which does not require OpenSSL to be installed. See SECURITY.md. The current build works but omits a warning; a fixed build is expected in a few days
  • Reduce number of generated classes for services. We now generate a fixed number of classes per service
  • Blocking stub now avoids the default executor of the channel. Processing is done on the blocked thread instead. This avoids a thread hop and reduces number of threads
  • Reworked compression API
  • Context.Key now uses instance equality, so if you reduce visibility to your Key you are guaranteed others can't access the value
  • Updated README to point to renamed Maven protoc plugin that is available on Maven Central

Other changes:

  • Now depending against protobuf-3.0.0-beta-2, protobuf-nano-3.0.0-alpha-5, and netty-4.1.0.CR1
  • Can now override the Executor for callbacks per-RPC
  • LoadBalancer now uses generics to no longer depend on any internal classes
  • Add Metadata.keys() for iterating over all metadata
  • Fix hanging RPCs caused by deadline expiring before RPC started (#1343)
  • Better status for some failed RPCs
  • Fixed a ConcurrentModificationException caused when new RPCs are being made when we transition to a freshly-connected transport
  • Context no longer has an internal ScheduledExecutorService; you must provide one when setting a deadline
  • Context cancellation on server-side is now more reliable
  • Fix a Netty transport ByteBuffer leak when queued RPCs fail (#1401)
  • In-process transport now calls onReady() correctly (#875)
  • Mostly resolve leak due to retaining RPCs, even after they are cancelled, when connecting persistently fails (#1342)
  • Fix interruption handling of blocking stubs to throw StatusRuntimeException instead of a RuntimeException

v0.12.0 Release

26 Jan 00:49
Compare
Choose a tag to compare

General:

  • Commas are now permitted in metadata values
  • Header names are now verified to contain only permitted characters (A-Z, a-z, underscore, dash, and period)
  • Addition of {ManagedChannel,Server}Builder.directExecutor() for low-latency use cases, with specialized handling internally to remove unnecessary locking
  • Further Compression support
  • {Client,Server}Call.request() is now defined as thread-safe
  • Increased unit test code coverage
  • Bug fixes

Android:

  • Hostname verification on Android, when not providing your own SSLCertificateSocketFactory
  • OkHttpChannelBuilder.overrideHostForAuthority() is deprecated; use overrideAuthority() which is available on all ManagedChannelBuilders
  • The codegen now places codegen intended for use with JavaNano protobuf in a 'nano' subpackage by default, like JavaNano does, and also observes javanano_use_deprecated_package
  • Codegen object allocation optimization for JavaNano protobuf
  • No longer referencing internal OkHttp classes; grpc now has its own copy of such classes. This reduces grpc's dependence on a particular version of OkHttp

Servers/Datacenter:

  • A strong beginning to client-side load balancing support. No server-side portion is provided, so not widely usable at this time. Providing custom load balancers is supported via ManagedChannelBuilder.loadBalancerFactory. Expect more in this area in the future
  • A strong beginning to name resolution support, via ManagedChannel.forTarget(). Providing custom name resolvers is supported via ManagedChannelBuilder.nameResolverFactory. Currently only DNS is implemented. Expect more in this area in the future
  • Fixed potential for flow-control deadlocking when activity on one stream is based on another in Netty (#1175)
  • Fix Netty transport failing to close all calls when notified that the TCP connection dropped (#1251)

Context:

  • Context helpers for Executors: Context.wrap(Executor) and Context.propagate(Executor). The former uses the current context whereas the latter uses the current Context when Executor.execute() is called
  • Context no longer maintains a stack of attachments and now just maintains the "current". Now, attach() returns the previously-attached Context which is then required to be passed to Context.detach(). This allows naturally restoring a consistent state when applications have bugs when attached/detaching Contexts
  • During cancellation Context now notifies all its direct listeners before notifying child contexts
  • Initial support for Context on both client and server. For client, the current Context during new call creation will be the current context during callbacks. For server, a new Context is created for each incoming call and cancelled when server responds

v0.9.1 Release

26 Jan 00:49
Compare
Choose a tag to compare
  • Hostname verification on Android, when not providing your own SSLCertificateSocketFactory
  • Fix Netty transport failing to close all calls when notified that the TCP connection dropped (#1251)

v0.9.0 Release

28 Sep 23:17
Compare
Choose a tag to compare

This release of gRPC-Java is considered beta quality.

As of this release, we expect no breaking API changes unless marked otherwise. This applies to API in packages io.grpc, io.grpc.auth, io.grpc.stub, and io.grpc.protobuf, as well as normal protobuf generated code. This does not apply to undocumented behavior; we are very likely to align gRPC-Java with the other gRPC implementations by trying harder before failing RPCs.

The codegen is not yet guaranteed forward-compatible as it uses unstable APIs. This will be resolved by 1.0. For now, you must still use the same version of the gRPC-Java protoc plugin as runtime version.

Major changes

  • APIs marked with @Internal should not be used and those marked with @ExperimentalApi may change in the future
  • Daemon threads are now used for all default thread pools
  • StreamObserver.onValue has been renamed to onNext to align with RxJava
  • Uses of ChannelImpl should now become ManagedChannel
  • ManagedChannelBuilder.forAddress(String, int) is now the preferred way of obtaining a channel builder; all transport-specific APIs do not have guaranteed API stability. Similarly, there is ServerBuilder.forPort(int) for server-side
  • Support for using OpenSSL via tcnative. It is preferred over using jetty-alpn. It requires OpenSSL 1.0.1 or later to be installed. gRPC will automatically fallback to NPN for OpenSSL pre-1.0.2. Please see SECURITY.md for more information
  • Metadata keys and ASCII values prohibit many characters, including comma. Comma may be permitted in the future

Minor changes

  • Netty and OkHttp builders support maxMessageSize(int) configuration
  • Fixes to incorrect usages of various Status codes
  • Updated to protobuf 3.0.0-beta-1. Codegen supports javanano_use_deprecated_package, but is not using it for determining which package to generate gRPC code. That will change in the next release
  • Zero-handshake JWT authentication support. To use, pass in ServiceAccountJwtAccessCredentials. In the future will likely support auto-conversion from ServiceAccountCredentials for use with GoogleCredentials.getApplicationDefault()
  • When server completes a call with an error, ServerCall.onComplete() is called instead of ServerCall.onCancel(). This was already the behavior, but the documentation now agrees
  • General bug fixes

v0.8.0 Release

14 Aug 23:04
Compare
Choose a tag to compare

Major changes

  • Deadlines are now enforced both on client / server
  • Automatic connection reties with backoff
  • Experimental Context API
  • In-process transport added
  • Implementation details moved to internal package

Minor changes

  • Numerous documentation improvements
  • Interceptors now fire in reverse order
  • OkHTTP now has TLS on by default
  • Multiple small method
  • OkHttp transports now start asynchronously
  • NPN Fallback for Android
  • Other small code cleanups
  • Lots of bug fixes

As we rapidly approach our beta release, we are cleaning up our API and organizing our code to increase maintainability. All breaking changes should have clear and available alternatives (method and class renames).

v0.7.2 Release

13 Jul 21:40
Compare
Choose a tag to compare

This is a patch release of v0.7.x that addresses two issues:

  1. a server-side memory leak when using ALPN (#598 via 492128e).
  2. Fix ALPN for OkHttp transport on Android versions older than 5.0.