From: Casey Bodley Date: Tue, 23 Feb 2016 18:08:15 +0000 (-0500) Subject: rgw: initialize async_rados before meta_mgr X-Git-Tag: v10.1.0~222^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8044dcb048b31c5d2c84206de21e4aee780d76eb;p=ceph.git rgw: initialize async_rados before meta_mgr RGWMetadataManager::init() will depend on async_rados Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 74162fb05384..58d44a506db4 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3665,6 +3665,15 @@ int RGWRados::init_complete() obj_expirer->start_processor(); } + /* not point of running sync thread if there is a single zone or + we don't have a master zone configured or there is no rest_master_conn */ + if (get_zonegroup().zones.size() < 2 || get_zonegroup().master_zone.empty() || !rest_master_conn) { + run_sync_thread = false; + } + + async_rados = new RGWAsyncRadosProcessor(this, cct->_conf->rgw_num_async_rados_threads); + async_rados->start(); + ret = meta_mgr->init(current_period.get_id()); if (ret < 0) { lderr(cct) << "ERROR: failed to initialize metadata log: " @@ -3678,15 +3687,6 @@ int RGWRados::init_complete() meta_notifier->start(); } - /* not point of running sync thread if there is a single zone or - we don't have a master zone configured or there is no rest_master_conn */ - if (get_zonegroup().zones.size() < 2 || get_zonegroup().master_zone.empty() || !rest_master_conn) { - run_sync_thread = false; - } - - async_rados = new RGWAsyncRadosProcessor(this, cct->_conf->rgw_num_async_rados_threads); - async_rados->start(); - if (run_sync_thread) { Mutex::Locker l(meta_sync_thread_lock); meta_sync_processor_thread = new RGWMetaSyncProcessorThread(this, async_rados);