twitter/finagle — pull request #172 by maddalab (2013-06-08 03:37:07+00:00)
Title: Open connection threshold et al

Note: This is only a replace to pull request https://github.com/twitter/finagle/pull/168 where @sprsquish was experiencing issues with applying the patch although a git merge was fine. This time around I have tried applying the generated patch and it applies correctly

This request primarily is intended to fix behavior of channel and connection settings. The ServerBuilder API in finagle provides options for specifying settings (a) channelMaxLifeTime (b) channelMaxIdleDuration and (c) OpenConnectionsThresholds.

Code that implemented these settings was removed as part of the refactorings

* https://github.com/twitter/finagle/commit/04f4d25ddbef0ba01569fe1e117295fe54234c2c
* https://github.com/twitter/finagle/commit/d92fedf49df

This change reintroduces these settings.

Having addressed the setting behavior, we uncovered a few other issues, primarily in the IdleConnectionFilter and its supporting data structure BucketGenerationalQueue in twitter/util. See the individual commit and messages for a further break down.

A pull request for BGQ was previously created. Note: These are changes originating from Tumblr.