Task #906853: Implement ThreadLocalServiceData and reduce lock contentions during channel counter update
Summary:
Cache the counter updates on thread local data structures and aggregate/publish
the data from a separate thread periodically. The ThreadLocalServiceData is
implemented on top of the TLStats data structures.
I am plannig to deploy a private build to production tomorrow to test this
change in production, but figured it might be better to send the diff out first
and get code review feedbacks at the same time.
Test Plan: Run and pass unit tests. Run end-to-end testings on sandbox. (TBD)
Deploy a private build to a production server and make sure the thrift call
latency is reduced.
Reviewed By: xin@fb.com
FB internal diff:
D540239