]> 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>
Fri, 27 Oct 2017 13:48:37 +0000 (09:48 -0400)
if the metadata listing fails, we won't have to clean up entries_index

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7f127f54406ef0e08a1265b9bc20433fe3f21523)

src/rgw/rgw_data_sync.cc

index 8fe6497f29b61a0d2ddc3b3da13b5e351189a6d6..088259b5afafca5eb348f5d9ccfa3cb4a5441230 100644 (file)
@@ -735,9 +735,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 */
@@ -748,6 +745,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;