提交 eecdebe6 编写于 作者: Y Yueh-Hsuan Chiang

Fixed the destruction order of static variables in ThreadStatusImpl.

上级 004f416b
......@@ -9,8 +9,6 @@
namespace rocksdb {
ThreadStatusImpl thread_local_status;
#if ROCKSDB_USING_THREAD_STATUS
__thread ThreadStatusData* ThreadStatusImpl::thread_status_data_ = nullptr;
std::mutex ThreadStatusImpl::thread_list_mutex_;
......@@ -20,6 +18,8 @@ std::unordered_map<const void*, ConstantColumnFamilyInfo*>
std::unordered_map<const void*, std::unordered_set<const void*>>
ThreadStatusImpl::db_key_map_;
ThreadStatusImpl thread_local_status;
ThreadStatusImpl::~ThreadStatusImpl() {
assert(thread_data_set_.size() == 0);
}
......@@ -188,5 +188,6 @@ void ThreadStatusImpl::EraseColumnFamilyInfo(const void* cf_key) {
void ThreadStatusImpl::EraseDatabaseInfo(const void* db_key) {
}
ThreadStatusImpl thread_local_status;
#endif // ROCKSDB_USING_THREAD_STATUS
} // namespace rocksdb
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册