add custom getLoad() for multifeed leaf
authorEdward Chin <edwardc@fb.com>
Tue, 18 Nov 2014 21:21:00 +0000 (13:21 -0800)
committerDave Watson <davejwatson@fb.com>
Wed, 19 Nov 2014 20:53:12 +0000 (12:53 -0800)
commit51c927b8979a690911da9addfec1dc1cf7947a67
tree57d2623680c256233526cf833920de8d1c23195c
parent998b419afe824049bf539699ca1968648db13e18
add custom getLoad() for multifeed leaf

Summary:
getLoad() is called in servicerouter loadbalancing when a load_counter is not specified.  I added a custom getLoad() for leaf and made it so that different metrics can be tested without code pushes.

Changes:
1) Overloaded PriorityThreadManager::getCodel() so you can specify a PRIORITY.  aggr->leaf thrift calls are marked as HIGH priority.
2) The value of FLAGS_load_metric determines what metric the custom getLoad() will use (codel, max requests, or fallback to ThriftServer::getLoad()).
3) Smc listener for FLAGS_load_metric.
4) Removed server->setIsUnevenLoad(false) since there isn't reason this need to be set, and activeRequests_ and getPendingCount() are not tracked when isUnevenLoad_ is false.

Test Plan: Run leaf and check that smc listener works.  Custom getLoad() won't be called until t5625774 is resolved.

Reviewed By: hitesh@fb.com

Subscribers: njormrod, folly-diffs@, trunkagent, varunk, fugalh, alandau, nkgupta, bmatheny, jaredg, xie, mshneer, yguo

FB internal diff: D1685215

Signature: t1:1685215:1416339297:0d1f8cb0cec27242d95f0067337d80149b0a720e
folly/experimental/wangle/concurrent/Codel.cpp
folly/experimental/wangle/concurrent/Codel.h