gRPC v1.21.0 Release Notes

Release Date: 2019-05-23 // almost 5 years ago
  • Dependencies

    • 🚚 context: Removed unnecessary deps from Bazel target. gRPC depends on these deps elsewhere, so it only benefits Bazel users using context by itself
    • ⬆️ core: Upgraded to OpenCensus 0.21.0 (#5657)
    • 🚚 services: Removed dependency on re2j. Re2j is no longer used by grpc

    πŸ› Bug Fixes

    • πŸš€ stub: release server-streaming reference on request after method call (#5638). This allows the request to be garbage collected much sooner for a long-lived RPC
    • netty: ALPN negotiation failure is now properly reported as UNAVAILABLE, not UNKNOWN
    • πŸ›  okhttp: Deadlock during transport start when network became unavailable during the start up is fixed (#5567)

    API Changes

    • πŸ“¦ api: The classes in io.grpc (not subpackages) were moved to a new artifact β€œgrpc-api”, from grpc-core (#5590). This allows using the API without bringing in as many dependencies, and makes it easier for libraries to have an optional dependency on the rest of grpc. grpc-core now depends on grpc-api. Many users should be able to depend on grpc-api instead of grpc-core if they wish. grpc-core still contains the in-process transport, io.grpc.util, and internal classes used elsewhere in grpc. Most users should still expect to have at least a transitive dependency on grpc-core.
    • api: Stabilized MethodDescriptor.Marshaller
    • api: Added NameResolverRegistry (#5586). It is now possible to construct a NameResolverProvider and register it into the global map manually. This is useful to inject dependencies into the name resolver.
    • api: add a convenience getService() method on MethodDescriptor (#5633)
    • πŸ—„ api: added a new LoadBalancer.handleResolvedAddresses() API for handling resolved addresses which includes service config explicitly (#5499). LoadBalancer.handleResolvedAddressGroups() is deprecated
    • πŸ—„ api: introduced NameResolver.Args that deprecates NameResolver.Helper. (#5664)
    • api: make LoadBalancer.Helper and Subchannel further non-thread-safe (#5718)
    • api: augment LoadBalancer.CreateSubchannelArgs with custom options (#5640)
    • πŸ—„ api: deleted ManagedChannelBuilder.loadBalancerFactory() and all deprecated factories (#5480). Use LoadBalancerRegistry and ManagedChannelBuilder.defaultLoadBalancingPolicy() instead
    • πŸ— api: changed ClientStreamTracer.StreamInfo to a final class with a builder (#5648)
    • core/util: create a ForwardingClientStreamTracer class for delegation use (#5589)
    • 0️⃣ netty: Netty server sets default socket options for all socket-based transports. Not just NIO

    πŸ†• New Features

    • ⚑️ stub: optimized CPU and memory usage of the internal ThreadlessExecutor used for blocking calls (#5516)
    • stub: Improved error message on client and server when StreamObserver.onNext() is called after onCompleted() (#5656)
    • 🐧 netty: Netty channel / server will now default to using Netty’s Epoll transport when able, otherwise uses Nio like before. To use epoll, it requires to have a runtime dependency netty-transport-native-epoll and epoll supported OS (linux) (#5581)
    • 0️⃣ netty: now defers to netty for the default number of event loops, if unspecified (#5585). This should only matter when using system properties to override Netty’s defaults
    • πŸ‘‰ netty: TCP_USER_TIMEOUT is now enabled and set to the keepalive timeout if keepalive is enabled and if using the netty epoll transport (#5599). This can reduce the failure detection delay without a network cost
    • 🌲 okhttp: add verbose logging for OkHttp HTTP/2 frame content (#5488)
    • πŸ— auth: MoreCallCredentials now uses Credentials Builder instead of deprecated constructor to create the ServiceAccountJwtAccessCredentials used internally. This means JWT will continue to be used when the constructor is removed. Before this change the code would fall back to exchanging OAuth tokens if the constructor was not available
    • examples/android: add example for grpc running under StrictMode (#5527)

    πŸ“š Documentation

    • πŸ“š api: add note about retrying UNAVAILABLE for non-idempotent RPCs in Status documentation (#5595)

    Acknowledgements

    Thanks to all of our contributors: