From: Matt Benjamin Date: Wed, 15 Nov 2023 18:39:18 +0000 (-0500) Subject: rgwlc: even current object versions have a unique instance X-Git-Tag: v19.1.0~564^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8a935bb115d53f94d2156bd0631a8ddc2e205d9e;p=ceph.git rgwlc: even current object versions have a unique instance Fixes: https://tracker.ceph.com/issues/63546 Signed-off-by: Matt Benjamin --- 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) {