Fixed the destruction order of static variables in ThreadStatusImpl.

main
Yueh-Hsuan Chiang 10 years ago
parent 004f416b77
commit eecdebe65b
  1. 5
      util/thread_status_impl.cc

@ -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

Loading…
Cancel
Save