From 46445a65d0284c25a8af0e5c78ea35cea0f51b86 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 28 Aug 2015 13:35:44 -0700 Subject: [PATCH] rgw: update global sync state after building meta indexes Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_sync.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 98cbbb076fe5e..a91f431bc0aa7 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -1347,7 +1347,6 @@ public: marker_tracker->start(iter->first); // fetch remote and write locally yield spawn(new RGWMetaSyncSingleEntryCR(store, http_manager, async_rados, iter->first, marker_tracker), false); - // update shard marker if (retcode < 0) { return set_state(RGWCoroutine_Error, retcode); } @@ -1512,6 +1511,14 @@ int RGWRemoteMetaLog::run_sync(int num_shards, rgw_meta_sync_status& sync_status ldout(store->ctx(), 0) << "ERROR: failed to fetch all metadata keys" << dendl; return r; } + + sync_status.sync_info.state = rgw_meta_sync_info::StateSync; + r = run(new RGWSimpleRadosWriteCR(async_rados, store, store->get_zone_params().log_pool, + mdlog_sync_status_oid, sync_status.sync_info)); + if (r < 0) { + ldout(store->ctx(), 0) << "ERROR: failed to update sync status" << dendl; + return r; + } /* fall through */ case rgw_meta_sync_info::StateSync: ldout(store->ctx(), 20) << __func__ << "(): sync" << dendl; -- 2.39.5