]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: init num shards if sync status did not exist
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 13 Nov 2015 21:47:54 +0000 (13:47 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:32 +0000 (16:13 -0800)
in data sync process

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_data_sync.cc

index 2e1b3d6e2f252c1066657b79daa74fd734336a4f..862e9c5fa49e3d6bfba7026a39cd4ed7de4bb510 100644 (file)
@@ -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);
       }