]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW - Move early return 44927/head
authorDaniel Gryniewicz <dang@redhat.com>
Mon, 7 Feb 2022 15:08:02 +0000 (10:08 -0500)
committerDaniel Gryniewicz <dang@redhat.com>
Mon, 7 Feb 2022 15:08:02 +0000 (10:08 -0500)
When transitioning an object to cloud, there was an early return,
skipping the removal of the cloud target.  Fix this to be in the right
place.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
src/rgw/rgw_lc.cc

index a819d61777800886a9cf33775a7b9ad686862ac8..4570689eea8e3c9815d09f4727d4149cf5847b46 100644 (file)
@@ -1468,11 +1468,11 @@ public:
 
     if (ret < 0) {
       ldpp_dout(oc.dpp, 0) << "ERROR: failed to transfer object(" << oc.o.key << ") to the cloud endpoint(" << endpoint << ") ret=" << ret << dendl;
-      return ret;
 
       if (!tier_ctx.target_bucket_created) {
         cloud_targets.erase(it.first);
       }
+      return ret;
     }
 
     if (delete_object) {