]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: orphans, fix check on number of shards
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 29 Jun 2015 22:34:44 +0000 (15:34 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 29 Jun 2015 22:34:44 +0000 (15:34 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_orphan.cc

index 0500746f9cdd16f07d81765b6ab475dfa3cb628a..257dd8074f3953287653496024cc0f6105e28b40 100644 (file)
@@ -165,9 +165,9 @@ int RGWOrphanSearch::init(const string& job_name, RGWOrphanSearchInfo *info) {
     return r;
   }
 
+  uint64_t num_shards = (info->num_shards ? info->num_shards : DEFAULT_NUM_SHARDS);
   if (r == 0) {
-    if (info->num_shards != state.info.num_shards) {
-      lderr(store->ctx()) << "ERROR: cannot specify different number of shards for existing job" << dendl;
+    if (num_shards != state.info.num_shards) {
       return -EINVAL;
     }
     search_info = state.info;
@@ -175,7 +175,7 @@ int RGWOrphanSearch::init(const string& job_name, RGWOrphanSearchInfo *info) {
   } else { /* r == -ENOENT */
     search_info = *info;
     search_info.job_name = job_name;
-    search_info.num_shards = (info->num_shards ? info->num_shards : DEFAULT_NUM_SHARDS);
+    search_info.num_shards = num_shards;
     search_info.start_time = ceph_clock_now(store->ctx());
     search_stage = RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_INIT);