]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use rgw::BucketReshardState for reshard state change
authorShilpa Jagannath <smanjara@redhat.com>
Mon, 29 Jun 2020 19:17:53 +0000 (00:47 +0530)
committerCasey Bodley <cbodley@redhat.com>
Thu, 4 Feb 2021 22:19:46 +0000 (17:19 -0500)
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
src/rgw/rgw_reshard.cc

index 7aab036005e13b5ab461f8011959d094eddbf693..a2889bae171903c153b3b26a89a57c31e28a44b3 100644 (file)
@@ -390,14 +390,14 @@ public:
     if (in_progress) {
       // resharding must not have ended correctly, clean up
       int ret =
-       RGWBucketReshard::clear_index_shard_reshard_status(store, bucket_info);
+       RGWBucketReshard::clear_index_shard_reshard_status(store, bucket_info);
       if (ret < 0) {
        lderr(store->ctx()) << "Error: " << __func__ <<
          " clear_index_shard_status returned " << ret << dendl;
       }
       set_status(rgw::BucketReshardState::None, dpp);
     }
-  }
+  } 
 
   int start() {
     int ret = set_status(rgw::BucketReshardState::InProgress, dpp);
@@ -653,12 +653,6 @@ int RGWBucketReshard::do_reshard(int num_shards,
       return ret;
   }
 
-  ret = bucket_info_updater.complete();
-  if (ret < 0) {
-    ldout(store->ctx(), 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
-    /* don't error out, reshard process succeeded */
-  }
-
   return 0;
   // NB: some error clean-up is done by ~BucketInfoReshardUpdate
 } // RGWBucketReshard::do_reshard
@@ -692,13 +686,6 @@ int RGWBucketReshard::execute(int num_shards, int max_op_entries,
     }
   }
 
-  // set resharding status of current bucket_info & shards with
-  // information about planned resharding
-  ret = set_resharding_status(cls_rgw_reshard_status::IN_PROGRESS);
-  if (ret < 0) {
-    return ret;
-    goto error_out;
-  }
 
   ret = do_reshard(num_shards,
                   max_op_entries,