delete reshard;
delete index_completion_manager;
- rgw::notify::shutdown();
+ if (run_notification_thread) {
+ rgw::notify::shutdown();
+ }
}
/**
}
index_completion_manager = new RGWIndexCompletionManager(this);
- ret = rgw::notify::init(cct, driver, dpp);
- if (ret < 0 ) {
- ldpp_dout(dpp, 1) << "ERROR: failed to initialize notification manager" << dendl;
+
+ if (run_notification_thread) {
+ ret = rgw::notify::init(cct, driver, dpp);
+ if (ret < 0 ) {
+ ldpp_dout(dpp, 1) << "ERROR: failed to initialize notification manager" << dendl;
+ }
}
return ret;
bool quota_threads;
bool run_sync_thread;
bool run_reshard_thread;
+ bool run_notification_thread;
RGWMetaNotifier *meta_notifier;
RGWDataNotifier *data_notifier;
public:
RGWRados(): timer(NULL),
gc(NULL), lc(NULL), obj_expirer(NULL), use_gc_thread(false), use_lc_thread(false), quota_threads(false),
- run_sync_thread(false), run_reshard_thread(false), meta_notifier(NULL),
+ run_sync_thread(false), run_reshard_thread(false), run_notification_thread(false), meta_notifier(NULL),
data_notifier(NULL), meta_sync_processor_thread(NULL),
bucket_index_max_shards(0),
max_bucket_id(0), cct(NULL),
run_reshard_thread = _run_reshard_thread;
return *this;
}
+
+ RGWRados& set_run_notification_thread(bool _run_notification_thread) {
+ run_notification_thread = _run_notification_thread;
+ return *this;
+ }
librados::IoCtx* get_lc_pool_ctx() {
return &lc_pool_ctx;
false,
false,
false,
+ false,
need_cache && g_conf()->rgw_cache_enabled,
need_gc);
}
run_quota,
run_sync,
g_conf().get_val<bool>("rgw_dynamic_resharding"),
+ true, // run notification thread
g_conf()->rgw_cache_enabled);
} /* init_storage */
DriverManager::Config cfg;
cfg.store_name = "rados";
cfg.filter_name = "none";
- driver = DriverManager::get_storage(&dp, g_ceph_context, cfg, false, false, false, false, false);
+ driver = DriverManager::get_storage(&dp, g_ceph_context, cfg, false, false, false, false, false, false);
if (!driver) {
std::cerr << "couldn't init storage provider" << std::endl;
return EIO;
cct->_conf->rgw_enable_quota_threads,
cct->_conf->rgw_run_sync_thread,
cct->_conf.get_val<bool>("rgw_dynamic_resharding"),
+ true, // run notification thread
cct->_conf->rgw_cache_enabled);
ldpp_dout(&dp, 1) << "Creating new driver" << dendl;
bool quota_threads,
bool run_sync_thread,
bool run_reshard_thread,
+ bool run_notification_thread,
bool use_cache,
bool use_gc)
{
.set_run_quota_threads(quota_threads)
.set_run_sync_thread(run_sync_thread)
.set_run_reshard_thread(run_reshard_thread)
+ .set_run_notification_thread(run_notification_thread)
.init_begin(cct, dpp) < 0) {
delete driver;
return nullptr;
.set_run_quota_threads(quota_threads)
.set_run_sync_thread(run_sync_thread)
.set_run_reshard_thread(run_reshard_thread)
+ .set_run_notification_thread(run_notification_thread)
.init_begin(cct, dpp) < 0) {
delete driver;
return nullptr;
bool quota_threads,
bool run_sync_thread,
bool run_reshard_thread,
+ bool run_notification_thread,
bool use_cache = true,
bool use_gc = true) {
rgw::sal::Driver* driver = init_storage_provider(dpp, cct, cfg, use_gc_thread,
quota_threads,
run_sync_thread,
run_reshard_thread,
+ run_notification_thread,
use_cache, use_gc);
return driver;
}
bool quota_threads,
bool run_sync_thread,
bool run_reshard_thread,
+ bool run_notification_thread,
bool use_metadata_cache,
bool use_gc);
/** Initialize a new raw Driver */