Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Apr 22, 2015
  1. @mosesn

    csl: Publish externally with pants, sbt, and friends

    mosesn authored jenkins committed
    It's difficult to publish util, finagle, etc. because we haven't
    updated them for the new maven-less world.
    Scripts that make it easy to publish with sbt and pants.  Bumped
    the server-set version because we stopped publishing thrift
    externally in ci.  Changed an ExitGuard test which broke under
    weird sbt conditions.
    We're in a position where we can start publishing finagle, etc
  2. @kevinoliver

    finagle-core: Deal with flakey tests

    kevinoliver authored jenkins committed
    A few tests are being noticed as flakey in CI.
    Mark some of the tests as flakey given the current situation.  Mixin
    IntegrationPatience as needed as well.
  3. @roanta

    finagle-core: Move finagle-mux requeues into the default stack

    roanta authored jenkins committed
    The requeue module in finagle-core lacked support for service
    acquisition failures under certain conditions. The requeue
    module in mux supports this plus requeues are credited at a ratio
    of requests.
    Move the mux requeue module into the default client stack.
  4. @nepthar

    finagle-core: Surface TLS peer cert info per request via Transport

    nepthar authored jenkins committed
    While it's possible to enable 2-way TLS, there's no way of accessing any details of the SSL session on a per-request basis, which is useful client/server identification and auth.
    SSL Session information is accessible via netty's SSLHandler, which is added to the ChannelPipeline for secure connections. This adds an optional SSLSession data member to the Transport trait. If present, this is propagated to each call to the service through Contexts.local via a dispatcher.
    SSL session info (if present) can be obtained by calling Transport.sslSession().
  5. @mosesn

    finagle-exp: Make BackupRequestFilter allocate less

    mosesn authored jenkins committed
    BackupRequestFilter was allocating right, left, and center.
    Remove as many allocations as possible while maintaining correctness
    and clarity.
Commits on Apr 20, 2015
  1. @luciferous

    [trivial] Display Trace and Span IDs in hexadecimal

    luciferous authored jenkins committed
    TraceId and SpanId values are displayed as Longs. They are more readable
    as hexadecimal, which is the conventional presentation.
    Display TraceId and SpanId values as hexadecimal.
  2. @vkostyukov

    finagle-zipkin: Add name to the RawZipkinTracer shutdown hook thread

    vkostyukov authored jenkins committed
  3. [classpath isolation] merge dependencies that share the same source i…

    Edouard Swiac authored jenkins committed
    …n finagle-mysql tests
  4. @kevinoliver

    finagle-memcache(x): Mark more integration tests as flaky

    kevinoliver authored jenkins committed
    The flaky tests continue to be found.
    Mark them as flaky until they can be addressed holistically.
  5. @atollena

    [finagle-core] Fix Path and NameTree grammar descrition

    atollena authored jenkins committed
    The grammars described in NameTree and Path do not match the parser.
    - Path rejects '/' but it's explicitly listed as a valid path
    - NameTree weights do not support full c-style float syntax.
    Also the parser blows up with weights composed of a single '.'.
    Make the grammar description match the parser, fix the parser on
    . weights.
  6. @nshkrob

    scrooge: Reduce allocations in generated code

    nshkrob authored jenkins committed
    Scrooge-generated code allocates reusable growable byte arrays for the response bytes up to a fixed size. If the size exceedes the max size, the array is discarded. For services with large response sizes, this leads to a large allocation for every response.
    Make the max buffer size tunable.
    - Add a maxThriftBufferSize parameter to the server constructor and a Stack param for it.
    - Add a srv/thrift/buffer/resetCount stat.
    - Increase the default maxCapacity of the reusable buffer in $FinagleService from 4K to 16K.
    - Replace orElse with pattern matching to avoid allocating a Function1.
    133124 bytes/iter -\> 102131 bytes/iter in allocation testing.
  7. @travisbrown

    Update SBT's ScalaCheck and ScalaTest versions to match 3rdparty

    travisbrown authored jenkins committed
  8. finagle-core: adding Filter.choose to dynamically choose a Filter bas…

    Gelin Zhou authored jenkins committed
    …ed on incoming requests
    It is common that we only want to apply a Filter to certain requests based on some criterion.
    This RB adds a new function Filter.choose() that avoids mixing filtering logic and predicate logic.
    Adding Filter.choose [Req, Rep]  (pf: PartialFunction[Req, Filter[Req, Rep, Req, Rep]]) to separate out filtering logic from the predicate logic. The partial function chooses a Filter to apply based on incoming requests, or does not apply any Filter if the PartialFunction pf is not defined at the request.
  9. @vkostyukov

    finagle-http(x): Improve HttpMuxer routing

    vkostyukov authored jenkins committed
  10. @dschobel

    finagle-memcached[|x]: flaky MigrationClient and ReplicationClient in…

    dschobel authored jenkins committed
    …tegration tests
    Tag flaky Migration and Replication client tests as flaky and mark
    for low-priority follow up.
  11. @vkostyukov

    finagle-mux: Decrease severity of a noisy logger in mux client

    vkostyukov authored jenkins committed
  12. @mosesn

    finagle-core: Removes old registry entries when they're no longer ref…

    mosesn authored jenkins committed
    Although creating many finagle clients is typically an antipattern,
    it's occasionally necessary, for example for web crawlers or link
    We remove old registry entries when they're no longer referenced.
    This requires adding a \`remove\` method to Registry, and hooking
    it up to closing the ServiceFactory you're handed.
    As long as users close their resources, registry "just works".
Commits on Apr 13, 2015
  1. @luciferous

    [trivial] Add withStreaming to Httpx protocol object

    luciferous authored jenkins committed
    The other params (e.g. MaxRequestSize) have with-helpers (e.g.
    `withMaxRequestSize()`) to help configure the parameter. The
    Streaming param is missing a with-helper.
    Add `withStreaming()`.
    Users can write `Httpx.server.withStreaming(true)` instead of
    `Httpx.server.configured(Httpx.param.Streaming(true))`. Also
    the Streaming param follows the same convention as the other
    Httpx params.
  2. @mosesn

    finagle-core: Doesn't create negative stats

    mosesn authored jenkins committed
    Ostrich logs whenever someone sends it a negative value, and because
    of clock skew, we often have negative values when comparing timestamps
    between machines.
    Replace negative values with 0.
  3. @kevinoliver

    util/finagle: Small changes to avoid allocations

    kevinoliver authored jenkins committed
    In various places we use methods that rely on Scala's implicits to
    enrich them. This typically at the cost of an unnecessary object
    allocation. There are some other simple changes to be made that
    avoid allocations as well.
    Use methods that do not require allocations. Some examples:
    * String.nonEmpty => !String.isEmpty
    * String.size => String.length
    * StringBuilder.size => StringBuilder.length
    * Array.size => Array.length
    * Seq.empty => Nil
  4. @dschobel

    finagle-core: fix flakyiness in c.t.finagle.builder.EndToEndTest

    dschobel authored jenkins committed
    Two c.t.finagle.builder.EndToEndTest tests are sporadically failing
    with timeout exceptions.
    Remove timeouts.
  5. @dschobel

    finagle-memcached[|x]: fix race in c.t.f.memcached.integration.Memcac…

    dschobel authored jenkins committed
    Test "re-hash when a bad host is ejected" is non-deterministically
    failing in asserting the eviction of a failed client.
    Lower the failure threshold and block on cache #set in test.
  6. @keeth

    Add Spright to Finagle adopters list

    keeth authored jenkins committed
    Signed-off-by: Travis Brown <>
  7. Add support for Redis HyperLogLog commands

    Charith Ellawala authored jenkins committed
    Finagle-redis currently lacks support for HyperLogLog commands
    Add code to enable calling PFADD, PFCOUNT and PFMERGE from RedisClient
    RedisClient API will have three new methods:
    - pfAdd
    - pfCount
    - pfMerge
    Signed-off-by: Travis Brown <>
  8. @kachayev

    Updated list of adopters with Attendify

    kachayev authored jenkins committed
    * keeping alphabetical order
    * link to the main page (there is no appropriate blog post just now)
    Signed-off-by: Travis Brown <>
  9. @mariusae

    finagle-core: maintain stats for transit times and deadline budgets

    mariusae authored jenkins committed
    This will provide some helpful production numbers to tune a
    threshold-based admissions controller.
Commits on Apr 6, 2015
  1. @travisbrown

    Use sbt-unidoc plugin and remove out-of-date copy-pasted version

    travisbrown authored jenkins committed
    A couple of months ago I set up our SBT builds to include API doc links in the
    POMs, which makes it possible for e.g. Finagle's API docs to link to Util's.
    This didn't actually work because we were using an old copy-pasted version of
    Unidoc, and unfortunately the same bug was present in the sbt-unidoc plugin.
    My fix for the sbt-unidoc bug is now available in the 0.3.2 release, so we can
    switch to using it. I've also added an API doc link to TwitterServer's SBT
    config, even though historically we haven't published TwitterServer's API docs
    (I'd like to start).
    We can build Finagle's API docs with Unidoc and have references to classes from
    Util and the Scala standard library automatically linked to their definitions in
    those projects' API docs.
  2. @travisbrown

    Fix problems with SBT and Travis CI builds, update Scala and SBT vers…

    travisbrown authored jenkins committed
    SBT builds for Finagle and associated projects were failing for a number of
    reasons, including third-party dependency versions that had been updated for
    Pants but not SBT, new tests that are run differently by the SBT test runner,
    and changes to JSON serialization that don't work the same on Scala 2.10 and
    2.11. Our SBT and Scala versions were also out of date.
    Also Travis CI's container-based infrastructure currently has a bug that causes
    the build to crash when getting the local hostname with IPv4 on OpenJDK 7
    (reported in #3120 on GitHub). Moving back to the standard Travis infrastructure
    is a trivial change, so I've included it here.
    I've updated the SBT and Scala versions throughout, and have updated third-party
    dependency versions to match the configuration in 3rdparty (note that I've
    followed the last update to scrooge/project/ in not updating the
    custom SBT script for Scrooge). TwitterServer now uses scala.xml, which is a
    separate module in Scala 2.11, so I've added a conditional dependency in the SBT
    The new ExitGuard tests were failing on SBT because clients were being left open
    in other test suites. I've daemonized all of these clients so that they don't
    create exit guards.
    In JsonSinkTest in TwitterServer I've desugared an implicit conversion
    provided by a view bound because Scala 2.11 prohibits Object as the target of an
    implicit conversion.
    Because Jackson doesn't correctly serialize Scala case classes that are defined
    locally in vals on Scala 2.11, I've moved three case classes out of vals and
    into the enclosing objects, changing names where necessary to avoid collisions,
    and making each case class private to the object.
    I've also switched all projects with a custom SBT script back to the standard
    Travis CI infrastructure.
    We're on the most recent versions of Scala and SBT, the SBT builds actually
    work, and Travis CI won't fail spuriously on OpenJDK 7.
  3. @kevinoliver

    util-stats: Fix deadlock in CumulativeGauge

    kevinoliver authored jenkins committed
    Lock acquisition order was not always consistent between
    `CumulativeGauge` and `StatsReceiverWithCumulativeGauges` which can
    lead to deadlocks.
    Remove synchronization from `StatsReceiverWithCumulativeGauges`.
  4. @travisbrown

    Update documentation about contributing

    travisbrown authored jenkins committed
    The contributing documentation currently recommends submitting pull requests
    against master.
    Update the contributing documentation to reflect the current workflow, and add
    a note about branches to the main README.
    Signed-off-by: Travis Brown <>
  5. remove glen from various OWNERS files

    Glen D Sanford authored jenkins committed
  6. @stuhood

    birdcage: Fix finagle-kestrelx provides clause

    stuhood authored jenkins committed
    - Fix finagle-kestrelx provides clause
  7. @dschobel

    birdcage/*: migrate to finagle-kestrelx

    dschobel authored jenkins committed
    Migrate birdcage from finagle-kestrel to finagle-kestrelx as part
    of Twitter's netty4 migration.
  8. @roanta

    finagle-benchmark: convert thrift benchmarks to jmh / smokestack

    roanta authored jenkins committed
  9. @luciferous

    [finagle-core] Fail readq before close

    luciferous authored jenkins committed
    Failures sent upstream from netty (via handleUpstream), don't fail the
    readq quickly enough. The fail calls close(), which hands execution back
    to netty (via Channels.close).
    We observe in one case that after sending a failure, netty is still able
    to send a subsequent message, which ends up on the readq, before we fail
    The related issue is that Netty sends upstream a partially deserialized
    and corrupt HttpResponse after sending failure.  The ChannelTransport
    should, upon receiving this failure, set the readq to Failing, which
    causes rejection of subsequent offers. But because of the order in which
    we call readq and close, the corrupt HttpResponse makes it into the
    readq before it is set to Failing.
    We fail the readq before close. This causes readq to reject any offers
    after the receipt of the first failure.
    Now, when Netty sends a failure and then the corrupted Response, the
    client dispatcher fails instead of passing the bad Response back to the
Something went wrong with that request. Please try again.