]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: init oldest period after setting run_sync_thread
authorOrit Wasserman <owasserm@redhat.com>
Wed, 1 Nov 2017 10:15:35 +0000 (12:15 +0200)
committerNathan Cutler <ncutler@suse.com>
Mon, 6 Nov 2017 12:23:41 +0000 (13:23 +0100)
Fixes: http://tracker.ceph.com/issues/21996
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit 8b301679161d1405fdae379ff93c33d4d637698d)

src/rgw/rgw_rados.cc

index 6d4a65ae619a11199ed909fd23f614cc3ff7c6ce..5057d2d04d8e76d1c07e46a9f4dc5aee1f9bb160 100644 (file)
@@ -4494,13 +4494,6 @@ int RGWRados::init_complete()
     obj_expirer->start_processor();
   }
 
-  if (run_sync_thread) {
-    // initialize the log period history. we want to do this any time we're not
-    // running under radosgw-admin, so we check run_sync_thread here before
-    // disabling it based on the zone/zonegroup setup
-    meta_mgr->init_oldest_log_period();
-  }
-
   /* no point of running sync thread if we don't have a master zone configured
     or there is no rest_master_conn */
   if (get_zonegroup().master_zone.empty() || !rest_master_conn
@@ -4508,6 +4501,11 @@ int RGWRados::init_complete()
     run_sync_thread = false;
   }
 
+  if (run_sync_thread) {
+    // initialize the log period history
+    meta_mgr->init_oldest_log_period();
+  }
+
   async_rados = new RGWAsyncRadosProcessor(this, cct->_conf->rgw_num_async_rados_threads);
   async_rados->start();