Finagle v6.39.0 Release Notes

  • ๐Ÿ†• New Features

    
    * finagle-core: `com.twitter.finagle.Failure` has a new flag, `NonRetryable`,
      which signifies that a request should not be retried. The flag is respected by
      all of Finagle's retry mechanisms. ``RB_ID=878766``
    
    * ๐Ÿ‘ finagle-thriftmux: Allow ThriftMux.Clients to be filtered. This is supported
      in the the StdStackClient but ThriftMux.Client is a StackBasedClient. ``RB_ID=874560``
    
    * finagle-netty4: Add boolean flag `com.twitter.finagle.netty4.poolReceiveBuffers` that
      enables/disables pooling of receive buffers (disabled by default). When enabled, lowers
      the CPU usage and allocation rate (GC pressure) with the cost of increased memory
      footprint at the startup. ``RB_ID=872940``
    
    * finagle-netty4: Add new histogram `receive_buffer_bytes` (only enabled with pooling)
      to keep track of the receive buffer sizes (useful for tuning pooling). ``RB_ID=877080``
    
    ๐Ÿ—„ Deprecations
    
    • ๐Ÿ— finagle-core: c.t.f.builder.ClientBuilder deprecate some seldom used methods. The same functionality is available through the Stack-based APIs or ClientBuilder.configured. RB_ID=878009

      • readerIdleTimeout
      • writerIdleTimeout
      • recvBufferSize
      • sendBufferSize
      • channelFactory
      • expHostConnectionBufferSize
    • ๐Ÿ—„ finagle-kestrel: Deprecate c.t.f.kestrel.protocol.Kestrel(), c.t.f.kestrel.protocol.Kestrel(failFast), and c.t.f.kestrel.protocol.Kestrel.get(). To create a Kestrel client using ClientBuilder, use .stack(c.t.f.Kestrel.client). RB_ID=870686

    ๐Ÿ’ฅ Breaking API Changes

    
    * finagle-core: The constructors for both `c.t.f.netty3.Netty3Listener` and
      `c.t.f.netty3.Netty3Transporter` now take `Stack.Params` instead of
      individual parameters. ``RB_ID=871251``
    
    * ๐Ÿ“ฆ finagle-thrift: The c.t.f.thrift.legacy package has been removed which included
      the public types `ThriftCall`, `ThriftReply`, and `ThriftCallFactory`.
      ``RB_ID=873982``
    
    โš™ Runtime Behavior Changes
    
    • finagle-core: Tolerate TraceIds that are greater than 64 bits in preparation of moving to 128 bit ids. RB_ID=874365

    • finagle-http: c.t.f.http.service.HttpResponseClassifier.ServerErrorsAsFailures now classifies a retryable nack as a ResponseClass.RetryableFailure. RB_ID=869182

    • finagle-http: c.t.f.Http.{Client,Server} is moving towards treating HTTP 5xx status codes as failures via c.t.f.http.service.HttpResponseClassifier.ServerErrorsAsFailures. This can be disabled by setting the toggle "com.twitter.finagle.http.serverErrorsAsFailures" to 0.0 or explicitly setting it using withResponseClassifier. RB_ID=869303, RB_ID=875367

    • ๐Ÿšš finagle-http: c.t.f.http.HttpServerDispatcher now removes the bodies from responses to HEAD requests in order to avoid a HTTP protocol error and logs the event at level error. Associated with this, the c.t.f.http.filter.HeadFilter will now strip the body from a chunked response, but in these cases the Writer associated with the response will receive a ReaderDiscarded exception if a write is attempted after the filter has run. RB_ID=872106

    • finagle-thrift: Also track response failures in the c.t.finagle.thrift.ThriftServiceIface#statsFilter in addition to successful responses that encode an Error or Exception. RB_ID=879075

    ๐Ÿ› Bug Fixes

    
    * finagle-http: Fix issue in `c.t.finagle.http.RequestBuilder` when the URI host contains
      underscores. ``RB_ID=870978``
    
    * finagle-http: A connection for HTTP/1.0 or non-keep-alive requests is now closed
      gracefully so that all requests that have been issued received responses.
      ``RB_ID=868767``
    
    * finagle-http: The HTTP/1.x server dispatcher no longer clobbers 'Connection: close'
      headers set by a service, resulting in the graceful shutdown of the connection.
      ``RB_ID=880007``
    
    * finagle-netty4: `ChannelTransport` now drains messages before reading more data off the
      transport which should reduce memory pressure in streaming protocols. ``RB_ID=872639``