December 2020 Release Notes - Version 20.12.0
You get two for the price of one this time! We skipped the 20.11.0 release, and we’re headed
straight to 20.12.0. This is the last minor bump of 2020, since there aren’t any other months
this year (we hope!). Goodbye to the optometrically significant year! 👓
New Features
- finagle-core: Add a new stat (histogram) that reports how long a task has been sitting in the
offload queue. This instrumentation is sampled at the given interval (100ms by default) that
can be overridden with a global flag com.twitter.finagle.offload.statsSampleInterval.
a7ebf2e1
- finagle-core: Add a new experimental flag com.twitter.finagle.offload.queueSize that allows to
put bounds on the offload queue. Any excess work that can’t be offloaded due to a queue overflow
is run on IO (Netty) thread instead. Put this way, this flag enables the simplest form of
backpressure on the link between Netty and OffloadFilter. af228ca6
- finagle-netty4: Add ExternalClientEngineFactory to the open source version of Finagle. This
SslClientEngineFactory acts as a better example of how to build custom client and server engine
factories in order to reuse SSL contexts for performance concerns. 931785d9
- finagle-core: Provide com.twitter.finagle.naming.DisplayBoundName for configuring how to
display the bound Name for a given client in metrics metadata. 67be8e1e
- finagle-core: Provide ClientParamsInjector, a class that will be service-loaded at run-time
by Finagle clients, and will allow generic configuration of all sets of parameters.
b7bb5afc
Breaking API Changes
- finagle-core: Move DarkTrafficFilter and AbstractDarkTrafficFilter from the experimental
finagle-exp to supported finagle-core. The package containing these classes changed from
c.t.finagle.exp to c.t.finagle.filter. 0ecaa5e7
- finagle-core, finagle-thrift: Move ForwardingWarmUpFilter and ThriftForwardingWarmUpFilter
from the experimental finagle-exp to supported finagle-core, and finagle-thrift, respectively.
The package containing ForwardingWarmUpFilter changed from c.t.finagle.exp to
c.t.finagle.filter, and the package containing ThriftForwardingWarmUpFilter changed from
c.t.finagle.exp to c.t.finagle.thrift.filter. e725bc86
- finagle-core: FailureAccrualFactory.isSuccess has been replaced with the method
def classify(ReqRep): ResponseClass to allow expressing that a failure should be ignored.
d586bd24
Runtime Behavior Changes
- finagle-core: Use Scala default implementation to calculate Hashcode and equals method for
ServiceFactoryProxy. c473b395
- finagle: Update build.sbt to get aarch64 binaries and try the fast path acquire up to 5 times
before failing over to the AbstractQueuedSynchronizer slow path in NonReentrantReadWriteLock
for Arm64. d45dfb02
Bug Fixes
- finagle-core: Users should no longer see the problematic
java.lang.UnsupportedOperationException: tail of empty stream when a c.t.f.s.RetryPolicy
is converted to a String for showing. e7ec247d
Added
- kafka: Add an option includePartitionMetrics to KafkaFinagleMetricsReporter to not include
metrics per partition of the FinagleKafkaConsumer. Defaults to true. 1f5a00ee
- finatra: Enables cross-build for 2.13.0 for inject-logback. 0468a613
- finatra-kafka-streams: Add delay DSL calls to insert a delay into a Kafka Streams topology.
- finatra: Enables cross-build for 2.13.0 for inject-thrift-client. 82cf2830
- finatra-kafka-streams: Add c.t.f.k.t.s.PersistentTimerValueStore which stores a value in the
timerstore that can be used when the timer is triggered. 3cd8bfc0
- inject-core: Add ability to call InMemoryStats#waitFor with a fixed timeout
306b7196
- finatra: Enables cross-build for 2.13.0 for httpclient, http, and jackson. d6dbc074
Changed
- inject-utils: Deprecate all methods in c.t.inject.conversions.map.RichMap, and move
functionality to c.t.conversions.MapOps in the util/util-core project. e765b5ae
- inject-utils: Deprecate all methods in c.t.inject.conversions.tuple, and move functionality
to c.t.conversions.TupleOps in the util/util-core project. 2bd6dbf6
- inject-utils: Deprecate all methods in c.t.inject.conversions.seq, and move functionality
to c.t.conversions.SeqOps in the util/util-core project. 0ad0d114
- inject-utils: Remove deprecated camelify, pascalify, and snakify from
c.t.inject.conversions.string.RichString. Additionally, deprecate toOption and
getOrElse in c.t.inject.conversions.string.RichString, and move functionality to
c.t.conversions.StringOps in the util/util-core project. b058e7f4
- c.t.finatra.http.exceptions.ExceptionMapperCollection changed from Traversable to Iterable
for cross-building 2.12 and 2.13. d6dbc074
- inject-core: (BREAKING API CHANGE) Move the testing utility InMemoryStatsReceiverUtility
and InMemoryStats into inject-core from inject-server. They can both be found under
com.twitter.inject. fa5d5d69
- validation: (BREAKING API CHANGE) Introduce new Validation Framework APIs which support
cascading validation to nested case classes and other improvements which also closer align
to JSR380. Validator#validate has changed from returning Unit and throwing an exception
to model the JSR380 version that returns a Set of failed constraints. There is a new method
which replicates the throwing behavior. 19008194
- kafka: Split c.t.f.kafka.tracingEnabled flag into c.t.f.k.producers.producerTracingEnabled and
c.t.f.k.consumers.consumerTracingEnabled to selectively enable/disable tracing for
producers/consumers. Producer tracing is turned on by default and consumer tracing is turned off
by default now. b95b8460
Fixed
- inject-server: Wire through HTTP method in AdminHttpClient so that POST requests can be made to
HTTPAdmin endpoints. 8d846128
Breaking API Changes
- util-core: removed com.twitter.util.Config. e95799b8
New Features
- util-core: c.t.conversions now includes conversion methods for maps (under MapOps)
that were moved from Finatra. 3aa49339
- util-core: c.t.conversions now includes conversion methods for tuples (under TupleOps)
that were moved from Finatra. 905bbf2a
- util-core: c.t.conversions now includes conversion methods for seqs (under SeqOps)
that were moved from Finatra. 654a0a37
- util-core: c.t.conversions now includes conversion methods toOption, and getOrElse
under StringOps. 2d7ec5c2
- util-core: c.t.util.Duration now includes fromJava and asJava conversions to
java.time.Duration types. 45340fb4
Runtime Behavior Changes
- util-core: Activity.apply(Event) will now propagate registry events to the underlying
Event instead of registering once and deregistering on garbage collection. This means
that if the underlying Event is “notified” while the derived Activity is not actively
being observed, it will not pick up the notification. Furthermore, the derived Activity
will revert to the Activity.Pending state while it is not under observation. f70326eb
- util-core: Activity#stabilize will now propagate registry events to the underlying
Activity instead of registering once and deregistering on garbage collection. This means
that if the underlying Activity is changed to a new state while the derived Activity is not actively
being observed, it will not update its own state. The derived Activity will maintain its last
“stable” state when it’s next observed, unless the underlying Activity was updated to a new “stable”
state, in which case it will pick that up instead. f70326eb
- util-stats: c.t.finagle.stats.DenylistStatsReceiver now includes methods for creating
DenyListStatsReceiver from partial functions. ba55bd0e
- util-core: c.t.util.FuturePool now supports exporting the number of its pending tasks via
numPendingTasks. 22fedfd1
- scrooge: Make options parser a separate class. All fields of com.twitter.scrooge.Compiler class
are changed to immutable types. 5960c564
- scrooge-generator: Java throws an exception when encountering incorrect field
types in a struct while deserializing. 39870f0f
- scrooge-generator: Scrooge no longer fails to parse Thrift IDL when annotations are used
on the individual components of a ‘container type’ (e.g. list, set, map). Those types of
annotations are not currently used by scrooge, instead they are skipped over and discarded,
but the IDL no longer fails to parse when they are encountered. 37edfe5b
- scrooge-generator: Scrooge preallocates containers to the correct size on the deepCopy
operation to improve performance in Java. acf9ae5f
- Escape user-provided string from the returned text. This removes a potential vector for an XSS
attack. e0aeb87e