Commits on Jul 22, 2016
  1. @cacoco

    ostrich, scrooge, finagle, twitter-server, finatra: Update TravisCI c…

    …onfigurations
    
    Problem
    
    We'd like to consolidate the logic of building the DAG that represents
    the dependency graph of Twitter OSS projects on each other. We recently
    introduced the Dodo project for this and now want to use it across our
    OSS TravisCI build configurations.
    
    See: https://github.com/twitter/dodo
    
    Solution
    
    Update the .travis.yml for projects which were previously using different
    scripts to build their dependencies to use Dodo.
    
    Result
    
    Less moving pieces for when changes need to happen.
    
    RB_ID=854739
    cacoco committed with jenkins Jul 22, 2016
  2. @nepthar

    finagle-core: Modify aperture size bounds + use Distributor-provided …

    …selections
    
    RB_ID=854271
    nepthar committed with jenkins Jul 22, 2016
  3. @kevinoliver

    finagle-core: Fix bug in scheduler metrics

    Problem
    
    In rb 828289 I broke the "scheduler/dispatches" and
    "scheduler/blocking_ms" gauges.
    
    Solution
    
    Keep a reference to the gauges by mutating the `gauges` list and add a
    test to verify this.
    
    RB_ID=854494
    kevinoliver committed with jenkins Jul 22, 2016
Commits on Jul 21, 2016
  1. @jcrossley

    finagle/doc: Update 'Extending Finagle' section for Netty 4

    Problem
    
    We want to include out best practices for protocol implementations
    in the documentation, as well as information on how to use Netty 4 types.
    
    Solution
    
    Update 'Extending Finagle' documentation to include Netty 4 examples
    and best practices.
    
    RB_ID=852131
    jcrossley committed with jenkins Jul 20, 2016
  2. @maheshkelkar

    Add transition to ProbeClosed in onServiceAcquisitionFailure

    Problem
    
    - If a memcached node is inactive, FAF pointing to the node enters DEAD state
    - After markDeadFor timeout, the FAF enters the startProbing state
    - When next probing (i.e. attempt to execute the request) fails, because node
      is still down, and factory (underlying(conn)) throws an exception
    - Currently, onServiceAcquisitionFailure function fails to close the probe
    - The FAF remains stuck in the ProbeOpen state and thus causing continuous
      failure
    
    Solution
    
    - Inside onServiceAcquisitionFailure, put transition the state into
      ProbeClosed state
    
    Describe the modifications you've done.
    - Added stopProbing method
    - The onServiceAcquisitionFailure calls stopProbing before calling didFail
    
    Result
    
    Signed-off-by: Jillian Crossley <jillianc@twitter.com>
    
    RB_ID=853048
    maheshkelkar committed with jenkins Jul 19, 2016
  3. @adriancole

    finagle-zipkin-core: Remove package protection for RawZipkinTracer

    Problem
    
    RawZipkinTracer is a base class that is extended to support other transports
    like http or kafka. The current implementation requires subtypes to be in the
    com.twitter package. This isn't likely intentional.
    
    Solution
    
    This removes the constraint that requires such subtypes to be in the
    com.twitter package.
    
    Result
    
    RawZipkinTracer can be extended from other packages, such as zipkin.finagle
    
    Signed-off-by: Jordan Parker <jparker@twitter.com>
    
    RB_ID=853430
    adriancole committed with jenkins Jul 19, 2016
  4. @kevinoliver

    finagle-core: Refactor loadbalancer's Distributor code

    Problem
    
    The user guide lacked information on the load balancer's behavior when
    all nodes are down. While working on documenting this, I found the
    `DistributorT` implementations to have a lot of repetition.
    
    Solution
    
    Refactor much of the shared code up into `DistributorT` and then document
    the behavior in the user guide that Finagle uses a node it believes to be
    down.
    
    RB_ID=852565
    kevinoliver committed with jenkins Jul 19, 2016
  5. @vkostyukov

    finagle-core: Reduce allocations & running time of Balancer.update

    Problem / Solution
    
    `Balancer.update` might be called quite often during an intensive rolling
    restart of a service it subscribed to. Big server set only makes it worse.
    We might want to reduce allocations and running time of this function to
    make we don't waste services' resources doing a background task.
    
    Results
    
     ~4.3x fewer running time
     ~9.1x fewer allocations
    
     Pairs (before and after)
    
     [info] Benchmark                                             Mode  Cnt        Score        Error  Units
     [info] BalancerBench.update5000x500                          avgt   10  2595081.432 ± 190806.841  ns/op
     [info] BalancerBench.update5000x500                          avgt   10   596893.398 ±  20023.940  ns/op
    
     [info] BalancerBench.update5000x500:·gc.alloc.rate.norm      avgt   10  3810860.727 ±   3302.709  B/op
     [info] BalancerBench.update5000x500:·gc.alloc.rate.norm      avgt   10   416814.503 ±     18.194  B/op
    
    RB_ID=852174
    vkostyukov committed with jenkins Jul 19, 2016
  6. @vkostyukov

    finagle-redis: Remove Codec [HUGE]

    Problem / Solution
    
    This is one more step towards Netty 4 support in `finagle-redis`. We're removing
    Redis codec (i.e., `c.t.f.Codec` implementation) now to simplify the rest of the
    migration process and minimize the maintenance burden.
    
    Please, note that this change also removes the server-side support for the Redis
    protocol in `finagle-redis` (serving `Service[Command, Reply]` within a Finagle
    server), which was previously supported via codec.
    
    RB_ID=848815
    TBR=true
    vkostyukov committed with jenkins Jul 18, 2016
  7. @olix0r

    finagle-http2: Fix Http2Transporter cache removal

    Problem
    
    The Http2Transporter will never remove cached transporters, since the value
    comparison always fails.
    
    Solution
    
    Pass the proper value into the transport cache remove() call.
    
    Signed-off-by: Moses Nakamura <mnakamura@twitter.com>
    
    RB_ID=852471
    olix0r committed with jenkins Jul 18, 2016
Commits on Jul 18, 2016
  1. @cacoco

    finagle-exp: Abstract out parts of the DarkTrafficFilter for potentia…

    …l re-use
    
    Problem
    
    Parts of the DarkTrafficFilter are useful to be defined in one place for re-use.
    Additionally, the current stat scoping is inconsistent with current Finagle best
    practices so has been changed from camelCase to snake_case ("darkTrafficFilter" ->
    "dark_traffic_filter").
    
    Solution
    
    Create an AbstractDarkTrafficFilter trait which encapsulated potentially
    re-usable functionality.
    
    Result
    
    If another filter with a different type signature is created it can re-use the
    important components of the DarkTrafficFilter through sub-classing the
    AbstractDarkTrafficFilter.
    
    RB_ID=852548
    cacoco committed with jenkins Jul 18, 2016
  2. @mosesn

    finagle-http2: Handle goaways properly client-side

    Problem
    
    Clients swallow GOAWAYs instead of following normal client behavior.
    
    Solution
    
    As a temporary measure, we're going to satisfy all oustanding
    requests with a fabricated 4XX based on the GOAWAY we received.
    
    We also changed the http2 end to end tests to test the http2 case,
    which will be the common case, instead of the http2 upgrade, which
    is interesting but not as urgent as making sure http2 works.
    
    Result
    
    Http2 clients don't hang randomly anymore.
    
    RB_ID=852038
    mosesn committed with jenkins Jul 18, 2016
  3. @roanta

    Problem

    We want to inspect the netty version at runtime for both clients
    and servers.
    
    Solution
    
    Export the Transporter/Listener details in StackClient/StackServer.
    
    RB_ID=851622
    roanta committed with jenkins Jul 15, 2016
  4. @kevinoliver

    finagle-core: Improve docs for request timeouts

    Problem / Solution
    
    The Scaladocs for request timeouts did not cover whether or not the
    Future was interrupted.
    
    RB_ID=852190
    kevinoliver committed with jenkins Jul 15, 2016
  5. @kevinoliver

    finagle/doc: Add docs on disable Twitter Thrift upgrade

    Problem / Solution
    
    There was no documentation in the user guide on how to disable the
    Twitter Thrift upgrade for clients.
    
    RB_ID=852249
    kevinoliver committed with jenkins Jul 15, 2016
  6. @kevinoliver

    finagle-toggle: Add ServerInfo.id

    Problem
    
    For toggles that are only evaluated once at initialization time, it is
    useful to have a consistent id to use as the input into
    `Toggle.apply`.
    
    Solution
    
    Introduce `c.t.f.server.ServerInfo.id` which is a String which can be
    used for this purpose.
    
    RB_ID=851762
    TBR=true
    kevinoliver committed with jenkins Jul 15, 2016
  7. @kevinoliver

    util-core, finagle-core: Expose metrics for default FuturePools

    Problem
    
    Service owners lack visibility into the state of util's default
    `c.t.util.FuturePools`.
    
    Solution
    
    Provide metrics for `FuturePool.unboundedPool` and
    `interruptibleUnboundedPool` via `FinagleStatsReceiver`.
    
    Result
    
    Developers will now have insight via new gauges:
    
     * finagle/future_pool/pool_size
     * finagle/future_pool/active_tasks
     * finagle/future_pool/completed_tasks
    
    RB_ID=850652
    kevinoliver committed with jenkins Jul 14, 2016
  8. @kcraigie

    finagle-http: Fix ResponseProxy for chunked transfers

    Problem
    
    Due to ResponseProxy's not overriding Message's reader member in terms of the
    proxied response, chunked responses were not getting passed through properly and
    the response would hang in Finagle.
    
    Solution
    
    Fixed by overriding the reader member in ResponseProxy per how RequestProxy does
    it. Added a unit test that breaks without this fix.
    
    RB_ID=851799
    kcraigie committed with jenkins Jul 14, 2016
  9. @kevinoliver

    finagle-stats: Flag to disable exporting empty histograms

    Problem
    
    Even for empty histograms the full details are always exported. This
    is wasteful for services with many empty histograms.
    
    Solution
    
    Introduce a flag, `com.twitter.finagle.stats.includeEmptyHistograms`
    which by setting to `false`, allows teams to only export a single
    value, `count=0` for those histograms.
    
    Result
    
    Far less metrics are exported.
    
    RB_ID=851485
    kevinoliver committed with jenkins Jul 14, 2016
  10. @hurrycane

    finagle-core: Changed c.t.f.TimeoutException to mixin HasLogLevel so …

    …that DefaultMonitor always logs it as TRACE
    
    RB_ID=849132
    hurrycane committed with jenkins Jul 14, 2016
  11. @kevinoliver

    twitter-server: Admin endpoint for Toggle mutations

    Problem
    
    Service owners need an API for updating the in-memory Toggles.
    
    Solution
    
    Provide PUT/DELETE methods on /admin/toggles so that
    create/update/deletes can be performed.
    
    Result
    
    To create or update the in-memory version of a toggle:
    `PUT /admin/toggles/$libraryName/$id?fraction=$fraction`
    
    To remove the in-memory version of a toggle:
    `DELETE /admin/toggles/$libraryName/$id`
    
    RB_ID=849906
    kevinoliver committed with jenkins Jul 11, 2016
Commits on Jul 11, 2016
  1. @yinquanteo

    Revert "finagle/finagle-memcached: Decoder on Buf"

    Reverting because it causes ads editor download to fail
    
    This reverts commit dfa87f2fb8785381c06bc58f70b027c81283f2b5.
    
    RB_ID=850427
    TBR=true
    yinquanteo committed with jenkins Jul 9, 2016
Commits on Jul 8, 2016
  1. @roanta

    finagle-{core, memcached}: Simplify construction of FailureAccrualFac…

    …tory
    
    Problem
    
    The construction of a FailureAccrualFactory was becoming unwieldy.
    It has numerous constructor which aren't used and caused varying
    runtime behavior. In particular, logging didn't work well when
    using some of the constructors and they allowed the user to avoid
    thinking about response classification, which is an important
    consideration.
    
    Solution
    
    Create one constructor with no default parameters. Move logging into
    the `didMarkDead` method instead of making it configurable via the
    constructor. Additonally, thread through response classification in
    the custom failure accrual module in finagle-memcached.
    
    RB_ID=849660
    roanta committed with jenkins Jul 8, 2016
  2. @roanta

    finagle-core: rm println from ExpiringService

    RB_ID=849779
    roanta committed with jenkins Jul 8, 2016
  3. @roanta

    finagle-mysql: use direct executor for Caffeine in PrepareCacheTest

    Problem
    
    PrepareCacheTest is flaky when we ported the underlying cache
    to caffeine. This is likely because caffeine delegates some
    of its work to an executor which doesn't inline the work.
    
    Solution
    
    Refactor `PrepareCache` to take a caffeine cache as a parameter
    and configure the executor for tests.
    
    RB_ID=849798
    roanta committed with jenkins Jul 8, 2016
  4. @jcrossley

    finagle/finagle-memcached: Decoder on Buf

    Problem
    
    As we move to Netty 4, we want decoding to be in terms of Buf,
    not ChannelBuf.
    
    Solution
    
    Make decoding in terms of Buf.
    
    RB_ID=836404
    jcrossley committed with jenkins Jul 7, 2016
Commits on Jul 7, 2016
  1. @vkostyukov

    csl: Release CSL libraries

    Problem / Solution
    
    Finagle 6.36
    Util 6.35
    Ostrich 9.19
    TwitterServer 1.21
    Finatra 2.2.0
    Scrooge 4.8.0
    
    RB_ID=849873
    vkostyukov committed with jenkins Jul 7, 2016
  2. @jcrossley

    finagle/finagle-memcached: Buf framer for Memcached

    Problem
    
    As part of the move to Netty 4, we want framing in terms of Buf.
    
    Solution
    
    Introduce Buf framers in Memcached.
    
    RB_ID=848795
    jcrossley committed with jenkins Jul 7, 2016
  3. @stuhood

    Fix response-classifier HTTP example

    Problem:
    
    Response classifier docs have a mismatched example for HTTP.
    
    Solution:
    
    Fixed the HTTP example.
    
    RB_ID=849136
    stuhood committed with jenkins Jul 6, 2016
  4. @cacoco

    Twitter OSS: Add ISSUE_TEMPLATE

    Problem
    
    Open source contributors don't have a standardized way of including information we
    would like to be included when contributors open issues.
    
    Solution
    
    Create an ISSUE template for opening issues. The template is useful for customizing
    and standardizing information we'd like to have contributors include when opening
    an issue against a library.
    
    Result
    
    More help when creating issues in our Twitter OSS repositories.
    
    RB_ID=849239
    cacoco committed with jenkins Jul 6, 2016
Commits on Jul 6, 2016
  1. @mosesn

    finagle-http2: Turn off Http2TransporterTests too

    Problem
    
    We're still failing our travisci build because of a tiny test in http2.
    
    Solution
    
    Short-term: disable it!  Long-term: Re-enable it once we figure out
    why it's breaking.
    
    RB_ID=849381
    TBR=true
    mosesn committed with jenkins Jul 6, 2016
  2. @mosesn

    finagle-http2: Turn off flaky test

    Problem
    
    We're failing our travisci build because of a tiny test in http2.
    
    Solution
    
    Short-term: disable it!  Long-term: Re-enable it once we figure out
    why it's breaking.
    
    RB_ID=849268
    mosesn committed with jenkins Jul 6, 2016
  3. @kevinoliver

    finagle-toggle: Make JSON description optional

    Problem
    
    For a service owner's JSON configuration files, it is detrimental to
    require the description field. This is because the library owner has
    defined the toggle in their configuration file and as such, requiring
    the service owner to also add a description is wasteful and could lead
    to confusion in the future if they input something incorrect.
    
    Solution
    
    Ignore the description field for service owner's config files.
    
    Also, in preparation for future work, `ToggleMap.newMutable` and
    `ToggleMap.Proxy` have been made public.
    
    RB_ID=848340
    kevinoliver committed with jenkins Jul 5, 2016
  4. @roanta

    Problem

    We want mux and thrift-mux on netty4.
    
    Solution
    
    Introduce a pipeline implementation of mux framing on netty4
    and wire in all the neccessary configuration for clients and
    servers to talk over netty4.
    
    Result
    
    ThriftMux.client
     .configured(Mux.param.MuxImpl.Netty4)
     .newService(dest)
    
    ThriftMux.server
      .configured(Mux.param.MuxImpl.Netty4)
      .serveIface(...)
    
    RB_ID=842869
    roanta committed with jenkins Jul 5, 2016
  5. @cacoco

    finagle: Ensure TravisCI configuration is exhaustive

    Problem
    
    Not every testable finagle sub-project is listed in the
    .travis.yml configuration.
    
    Solution
    
    Add testable projects.
    
    Result
    
    More exhaustive TravisCI testing.
    
    RB_ID=848844
    cacoco committed with jenkins Jul 5, 2016