From b82e3e68a9a7d1832036a5d2673c1282a43e74f9 Mon Sep 17 00:00:00 2001 From: Daniel Gryniewicz Date: Mon, 7 Feb 2022 10:08:02 -0500 Subject: [PATCH] RGW - Move early return 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 --- src/rgw/rgw_lc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index a819d61777800..4570689eea8e3 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -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) { -- 2.39.5