From: Casey Bodley Date: Fri, 8 Dec 2023 20:26:21 +0000 (-0500) Subject: rgw/multisite: error repo coroutines store raw_obj by value X-Git-Tag: v19.3.0~361^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ce6905f9e852c8fa4373002413f9bf563cd0c152;p=ceph.git rgw/multisite: error repo coroutines store raw_obj by value RGWErrorRepoWriteCR/RGWErrorRepoRemoveCR need to copy their rgw_raw_obj arguments to extend the lifetimes until send_request() is called potential regression from https://github.com/ceph/ceph/pull/50359 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/driver/rados/rgw_sync_error_repo.cc b/src/rgw/driver/rados/rgw_sync_error_repo.cc index aca671039ee1..c180497bd73d 100644 --- a/src/rgw/driver/rados/rgw_sync_error_repo.cc +++ b/src/rgw/driver/rados/rgw_sync_error_repo.cc @@ -118,7 +118,7 @@ int remove(librados::ObjectWriteOperation& op, class RGWErrorRepoWriteCR : public RGWSimpleCoroutine { librados::Rados* rados; - const rgw_raw_obj& raw_obj; + rgw_raw_obj raw_obj; std::string key; ceph::real_time timestamp; @@ -163,7 +163,7 @@ RGWCoroutine* write_cr(librados::Rados* rados, class RGWErrorRepoRemoveCR : public RGWSimpleCoroutine { librados::Rados* rados; - const rgw_raw_obj& raw_obj; + rgw_raw_obj raw_obj; std::string key; ceph::real_time timestamp;