]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
tools: remove background eviction
authorYuan Zhou <yuan.zhou@intel.com>
Fri, 21 Dec 2018 01:20:07 +0000 (09:20 +0800)
committerYuan Zhou <yuan.zhou@intel.com>
Thu, 21 Mar 2019 16:16:25 +0000 (00:16 +0800)
do eviction check in promotion callback simply

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
src/tools/immutable_object_cache/ObjectCacheStore.cc
src/tools/immutable_object_cache/ObjectCacheStore.h

index 6b3dbae79dc698b2785ecb478a8441d4562d1f31..63b742e14810120706c633bf7746b8be9323ad7f 100644 (file)
@@ -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;
 }
index d51ce326f364521e7ed2c57e5bfaef0ee4ab250d..4b71e24a9677c4dded8b8b7aba5d30e60fb955c6 100644 (file)
@@ -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;