]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: initialize async_rados before meta_mgr
authorCasey Bodley <cbodley@redhat.com>
Tue, 23 Feb 2016 18:08:15 +0000 (13:08 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 4 Mar 2016 22:04:08 +0000 (17:04 -0500)
RGWMetadataManager::init() will depend on async_rados

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rados.cc

index 74162fb053849007645c34fddf0152edef079a53..58d44a506db424926c91944c509fa4060fd1d2a9 100644 (file)
@@ -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);