From b3b915737c27cc487f13e240abcbb0048cd119da Mon Sep 17 00:00:00 2001 From: Yuan Zhou Date: Fri, 21 Dec 2018 09:20:07 +0800 Subject: [PATCH] tools: remove background eviction do eviction check in promotion callback simply Signed-off-by: Yuan Zhou --- src/tools/immutable_object_cache/ObjectCacheStore.cc | 10 ---------- src/tools/immutable_object_cache/ObjectCacheStore.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/src/tools/immutable_object_cache/ObjectCacheStore.cc b/src/tools/immutable_object_cache/ObjectCacheStore.cc index 6b3dbae79dc..63b742e1481 100644 --- a/src/tools/immutable_object_cache/ObjectCacheStore.cc +++ b/src/tools/immutable_object_cache/ObjectCacheStore.cc @@ -57,22 +57,12 @@ int ObjectCacheStore::init(bool reset) { efs::create_directories(m_cache_root_dir); } - evict_thd = new std::thread([this]{this->evict_thread_body();}); return ret; } -void ObjectCacheStore::evict_thread_body() { - int ret; - while(m_evict_go) { - ret = evict_objects(); - } -} - int ObjectCacheStore::shutdown() { ldout(m_cct, 20) << dendl; - m_evict_go = false; - evict_thd->join(); m_rados->shutdown(); return 0; } diff --git a/src/tools/immutable_object_cache/ObjectCacheStore.h b/src/tools/immutable_object_cache/ObjectCacheStore.h index d51ce326f36..4b71e24a967 100644 --- a/src/tools/immutable_object_cache/ObjectCacheStore.h +++ b/src/tools/immutable_object_cache/ObjectCacheStore.h @@ -60,8 +60,6 @@ class ObjectCacheStore ObjectCacheFile *m_cache_file; Policy* m_policy; - std::thread* evict_thd; - bool m_evict_go = false; //TODO(): make this configurable int m_dir_num = 10; -- 2.39.5