From 8a935bb115d53f94d2156bd0631a8ddc2e205d9e Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Wed, 15 Nov 2023 13:39:18 -0500 Subject: [PATCH] rgwlc: even current object versions have a unique instance Fixes: https://tracker.ceph.com/issues/63546 Signed-off-by: Matt Benjamin --- src/rgw/rgw_lc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index fec80339d0ffb..4364c2e683c86 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -522,7 +522,7 @@ static int remove_expired_obj( auto obj_key = o.key; auto& meta = o.meta; int ret; - auto& version_id = obj_key.instance; + auto version_id = obj_key.instance; // deep copy, so not cleared below std::unique_ptr notify; /* per discussion w/Daniel, Casey,and Eric, we *do need* @@ -849,7 +849,7 @@ int RGWLC::handle_multipart_expiration(rgw::sal::Bucket* target, target, lc_id, const_cast(target->get_tenant()), lc_req_id, null_yield); - auto& version_id = obj.key.instance; + auto version_id = obj.key.instance; ret = notify->publish_reserve(this, nullptr); if (ret < 0) { @@ -1356,7 +1356,7 @@ public: bucket, lc_id, const_cast(oc.bucket->get_tenant()), lc_req_id, null_yield); - auto& version_id = oc.o.key.instance; + auto version_id = oc.o.key.instance; ret = notify->publish_reserve(oc.dpp, nullptr); if (ret < 0) { -- 2.39.5