]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: ListBucketIndexesCR spawns entries_index after listing metadata
authorCasey Bodley <cbodley@redhat.com>
Mon, 9 Oct 2017 18:08:21 +0000 (14:08 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 11 Oct 2017 20:14:04 +0000 (16:14 -0400)
if the metadata listing fails, we won't have to clean up entries_index

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_data_sync.cc

index 72cd1ef8bf581cc6e0f59eae6678d671a4e584d3..19e60712fc9896562cd581ac4144c3f51f24d902 100644 (file)
@@ -754,9 +754,6 @@ public:
 
   int operate() override {
     reenter(this) {
-      entries_index = new RGWShardedOmapCRManager(sync_env->async_rados, store, this, num_shards,
-                                                 store->get_zone_params().log_pool,
-                                                  oid_prefix);
       yield {
         string entrypoint = string("/admin/metadata/bucket.instance");
         /* FIXME: need a better scaling solution here, requires streaming output */
@@ -767,6 +764,10 @@ public:
         ldout(sync_env->cct, 0) << "ERROR: failed to fetch metadata for section bucket.index" << dendl;
         return set_state(RGWCoroutine_Error);
       }
+      entries_index = new RGWShardedOmapCRManager(sync_env->async_rados, store, this, num_shards,
+                                                 store->get_zone_params().log_pool,
+                                                  oid_prefix);
+      yield; // yield so OmapAppendCRs can start
       for (iter = result.begin(); iter != result.end(); ++iter) {
         ldout(sync_env->cct, 20) << "list metadata: section=bucket.index key=" << *iter << dendl;