Vladimir Kostyukov

@vkostyukov

Posted April 19, 2019

April 2019 Release Notes - Version 19.4.0

Highlights

  • After several years of continuous effort decoupling Finagle from Netty 3, we’ve finally got to the point the dependency can be dropped. As of this release, there is no Netty 3 artifacts on the classpath.
  • Finagle HTTP now transmits trailing headers (trailers).
  • Finagle HTTP has become more strict with headers validation and is now in compliance with RFC7230.

Finagle

New Features

  • finagle-core: Make maxDepth in Namer configurable. 03cc3197
    • namerMaxDepth in Namer now configurable through a global flag (namerMaxDepth)
  • finagle-core: The newly renamed SslSessionInfo is now public. It is intended for providing information about a connection’s SSL/TLS session. 811fe004
  • finagle-core: Added the c.t.finagle.DtabFlags trait which defines a Flag and function for appending to the “base” c.t.finagle.Dtab delegation table. 675630df
  • finagle-http: Finagle HTTP implementation now supports trailing headers (trailers). Use c.t.f.http.Message.trailers to access trailing headers on a fully-buffered message (isChunked == false) or c.t.f.http.Message.chunkReader on a message with chunked payload (isChunked == true). 351c43c1
  • finagle-http,thriftmux: Added tracing annotations to backup requests. 48f54e82
    • Binary annotation srv/backup\_request\_processing, when servers are processing backup requests.
  • finagle-http: Added new server metrics to keep track of inbound requests that are rejected due to their headers containing invalid characters (as seen by RFC-7230): rejected_invalid_header_names and rejected_invalid_header_values. 41bd061a
  • finagle-http: Added stats of the duration in milliseconds of request/response streams: request_stream_duration_ms and response_stream_duration_ms. They are enabled by using .withHttpStats on Http.Client and Http.Server 916f4a26
  • finagle-mysql: A new toggle, com.twitter.finagle.mysql.IncludeHandshakeInServiceAcquisition, has been added. Turning on this toggle will move MySQL session establishment (connection phase) to be part of service acqusition. fe4d8919

Runtime Behavior Changes

  • finagle-core: Client-side nacking admission control now defaults on. See the documentation on c.t.f.filter.NackAdmissionFilter for details. This can be disabled by setting the global flag, com.twitter.finagle.client.useNackAdmissionFilter, to false. aa36f56b
  • finagle-core: LatencyCompensation now applies to service acquisition. 1ec020a5
  • finagle-http: HTTP headers validation on the outbound path is now in compliance with RFC7230. 5b2e9f95
  • finagle-netty4: Netty’s reference leak tracking now defaults to disabled. Set the flag com.twitter.finagle.netty4.trackReferenceLeaks to true to enable. f63d7f7a

Breaking API Changes

  • finagle: Dropped a dependency on Netty 3 03c773a5:

    • finagle-netty3 sub-project has been removed
    • finagle-http-cookie sub-project has been removed
    • c.t.f.http.Cookie no longer takes Netty’s DefaultCookie in the constructor
  • finagle-core: The peerCertificate methods of c.t.f.t.TransportContext and c.t.f.p.PushChannelHandle have been replaced with the more robust sslSessionInfo. Users looking for just the functional equivalence of peerCertificate can use sslSessionInfo.peerCertificates.headOption. dc4bfbcf

  • finagle-core: The com.twitter.finagle.core.UseClientNackAdmissionFilter toggle has been replaced by a global flag, com.twitter.finagle.client.useNackAdmissionFilter. aa36f56b

  • finagle-thrift: Allow users to specify stringLengthLimit and containerLengthLimit 233150a9

    • method parameter readLength in com.twitter.finagle.thrift.Protocols#binaryFactory renamed to stringLengthLimit to reflect usage
    • method parameter containerLengthLimit added to com.twitter.finagle.thrift.Protocols#binaryFactory

Finatra

Added

  • inject-server: Add globalFlags argument to EmbeddedTwitterServer, which will allow for scoping a c.t.a.GlobalFlag property change to the lifecycle of the underlying TwitterServer, as a c.t.a.GlobalFlag is normally scoped to the JVM/process. This change is also reflected in EmbeddedHttpServer and EmbeddedThriftServer constructors. 38a3180a
  • inject-utils: add toOrderedMap implicit conversion for java.util.Map 1686420c
  • finatra-kafka-streams: Add flag rocksdb.manifest.preallocation.size with default value 4.megabytes to c.t.f.k.c.RocksDbFlags and set value in c.t.f.k.c.FinatraRocksDBConfig. 0cac9785
  • finatra-http: Add commaSeparatedList boolean parameter to QueryParams, for parsing comma-separated query parameters into collection types. 0ae425a2

Changed

  • finatra-kafka: Upgraded kafka libraries from 2.0.0 to 2.2.0 9d22ee7e
  • finatra-thrift: Removed c.t.finatra.thrift.exceptions.FinatraThriftExceptionMapper, c.t.finatra.thrift.filters.ClientIdAcceptlistFilter, c.t.finatra.thrift.modules.ClientIdAcceptlistModule, c.t.finatra.thrift.filters.ClientIdWhitelistFilter, c.t.finatra.thrift.modules.ClientIdWhitelistModule, and the finatra/finatra_thrift_exceptions.thrift IDL. caed5ec8
  • finatra-thrift: Constructing a ThriftRouter now requires serverName. dc357fd8
  • finatra-examples: Updated StreamingController to use Reader instead of AsyncStream 3d5e3282
  • finatra-kafka-streams: Implement FinatraKeyValueStore as custom store. cd38ddf6
  • finatra-thrift: Constructing a ThriftRouter now requires c.t.f.StackTransformer. a96312d2

Fixed

  • finatra-kafka: Ensure that EmbeddedKafka implementation of beforeAll() makes call to super.beforeAll() so hooks registered in super class get executed. 9404b28f
  • finatra-kafka-streams: FinatraTransformer.timerStore config object references immutable map which causes exception thrown if user code calls AbstractStoreBuilder.withLoggingDisabled. Fixed FinatraTransformer.timerStore to convert from immutable map to mutable map before forwarding config object to kafka library. 827c4612

Twitter Server

  • Remove deprecated uses of c.t.server.ShadowAdminServer. e94e8300
  • Mix in the c.t.finagle.DtabFlags to allow servers to append to the “base” c.t.finagle.Dtab delegation table. Users can now call c.t.finagle.DtabFlags\#addDtabs() when they want to append the parsed Flag value to the Dtab.base delegation table. Users should note to only call this method after Flag parsing has occurred (which is after init and before premain). We also update the c.t.server.handler.DtabHandler to always return a proper JSON response of the currently configured c.t.finagle.Dtab.base. a00e3942

Util

  • util-app: Improve usage of Flag.let by providing a Flag.letParse method 0d9dded3