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
Showing
Please register or sign in to comment