diff --git a/util/thread_status_util.cc b/util/thread_status_util.cc index dc2e7dcfe..06560083d 100644 --- a/util/thread_status_util.cc +++ b/util/thread_status_util.cc @@ -144,10 +144,11 @@ void ThreadStatusUtil::EraseColumnFamilyInfo( } void ThreadStatusUtil::EraseDatabaseInfo(const DB* db) { - if (thread_updater_local_cache_ == nullptr) { + ThreadStatusUpdater* thread_updater = db->GetEnv()->GetThreadStatusUpdater(); + if (thread_updater == nullptr) { return; } - thread_updater_local_cache_->EraseDatabaseInfo(db); + thread_updater->EraseDatabaseInfo(db); } bool ThreadStatusUtil::MaybeInitThreadLocalUpdater(const Env* env) {