Changli Gao 8e68ffb872 Fix deadlock when calling getMergedHistogram
Summary:
When calling StatisticsImpl::HistogramInfo::getMergedHistogram(), if
there is a dying thread, which is calling
ThreadLocalPtr::StaticMeta::OnThreadExit() to merge its thread values to
HistogramInfo, deadlock will occur. Because the former try to hold
merge_lock then ThreadMeta::mutex_, but the later try to hold
ThreadMeta::mutex_ then merge_lock. In short, the locking order isn't
the same.

This patch addressed this issue by releasing merge_lock before folding
thread values.
Closes https://github.com/facebook/rocksdb/pull/1552

Differential Revision: D4211942

Pulled By: ajkr

fbshipit-source-id: ef89bcb
2016-12-09 12:59:51 -08:00
..
2016-08-19 12:28:19 -07:00
2016-08-31 08:56:34 -07:00
2016-08-19 12:28:19 -07:00
2016-09-13 12:08:22 -07:00
2016-05-06 17:42:50 -07:00
2016-09-13 12:08:22 -07:00
2016-07-15 10:41:36 -07:00
2016-03-11 22:56:25 -08:00
2016-03-15 11:38:15 -07:00
2016-09-13 12:08:22 -07:00
2016-09-13 12:08:22 -07:00
2016-11-28 17:11:29 -08:00
2016-02-17 20:22:40 +08:00
2016-09-01 13:50:39 -07:00
2016-09-01 13:50:39 -07:00
2016-06-10 16:37:36 -07:00
2016-04-01 11:06:06 -07:00
2016-09-02 17:10:28 -07:00