From: Yehuda Sadeh Date: Fri, 13 Nov 2015 21:47:54 +0000 (-0800) Subject: rgw: init num shards if sync status did not exist X-Git-Tag: v10.1.0~354^2~211 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1aabaafe06f2b7390aa28ff2d6b465bada3a2e43;p=ceph.git rgw: init num shards if sync status did not exist in data sync process Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 2e1b3d6e2f25..862e9c5fa49e 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1066,7 +1066,9 @@ public: } } - if (retcode < 0 && retcode != -ENOENT) { + if (retcode == -ENOENT) { + sync_status.sync_info.num_shards = num_shards; + } else if (retcode < 0 && retcode != -ENOENT) { ldout(store->ctx(), 0) << "ERROR: failed to fetch sync status, retcode=" << retcode << dendl; return set_cr_error(retcode); }