From: jimifm Date: Thu, 25 May 2017 08:13:01 +0000 (+0800) Subject: Remove duplicate calls because the destructor has been processed X-Git-Tag: v12.1.1~65^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=57f1b429f9eedb70c233cfa47e521ed156e136b8;p=ceph.git Remove duplicate calls because the destructor has been processed Uniform class RGWObjectExpirer and class RGWGC's destructor Signed-off-by: jimifm --- diff --git a/src/rgw/rgw_object_expirer_core.h b/src/rgw/rgw_object_expirer_core.h index 813eca3f939a..a42482942d73 100644 --- a/src/rgw/rgw_object_expirer_core.h +++ b/src/rgw/rgw_object_expirer_core.h @@ -70,7 +70,10 @@ protected: public: explicit RGWObjectExpirer(RGWRados *_store) - : store(_store) { + : store(_store), worker(NULL) { + } + ~RGWObjectExpirer() { + stop_processor(); } int garbage_single_object(objexp_hint_entry& hint); diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 8480313e9317..7cda9b5a3bb5 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3406,32 +3406,24 @@ void RGWRados::finalize() delete finisher; } if (meta_notifier) { - meta_notifier->stop(); delete meta_notifier; } if (data_notifier) { - data_notifier->stop(); delete data_notifier; } delete data_log; if (async_rados) { delete async_rados; } - if (use_gc_thread) { - gc->stop_processor(); - obj_expirer->stop_processor(); - } + delete gc; gc = NULL; - if (use_lc_thread) { - lc->stop_processor(); - } - delete lc; - lc = NULL; - delete obj_expirer; obj_expirer = NULL; + + delete lc; + lc = NULL; delete rest_master_conn;