From 8b301679161d1405fdae379ff93c33d4d637698d Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Wed, 1 Nov 2017 12:15:35 +0200 Subject: [PATCH] rgw: init oldest period after setting run_sync_thread Fixes: http://tracker.ceph.com/issues/21996 Signed-off-by: Orit Wasserman --- src/rgw/rgw_rados.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 0764d780105..38a2a860b83 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4449,13 +4449,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 @@ -4463,6 +4456,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(); -- 2.39.5