#include "rgw_log.h"
#include "rgw_gc.h"
+#include "rgw_object_expirer_core.h"
#define dout_subsys ceph_subsys_rgw
delete data_log;
if (use_gc_thread) {
gc->stop_processor();
- delete gc;
- gc = NULL;
+ obj_expirer->stop_processor();
}
+ delete gc;
+ gc = NULL;
+
+ delete obj_expirer;
+ obj_expirer = NULL;
+
delete rest_master_conn;
map<string, RGWRESTConn *>::iterator iter;
gc = new RGWGC();
gc->initialize(cct, this);
- if (use_gc_thread)
+ obj_expirer = new RGWObjectExpirer(this);
+
+ if (use_gc_thread) {
gc->start_processor();
+ obj_expirer->start_processor();
+ }
quota_handler = RGWQuotaHandler::generate_handler(this, quota_threads);
class SafeTimer;
class ACLOwner;
class RGWGC;
+class RGWObjectExpirer;
/* flags for put_obj_meta() */
#define PUT_OBJ_CREATE 0x01
};
RGWGC *gc;
+ RGWObjectExpirer *obj_expirer;
bool use_gc_thread;
bool quota_threads;
public:
RGWRados() : max_req_id(0), lock("rados_timer_lock"), watchers_lock("watchers_lock"), timer(NULL),
- gc(NULL), use_gc_thread(false), quota_threads(false),
+ gc(NULL), obj_expirer(NULL), use_gc_thread(false), quota_threads(false),
num_watchers(0), watchers(NULL),
watch_initialized(false),
bucket_id_lock("rados_bucket_id"),