From: Samuel Just Date: Wed, 8 Jan 2025 19:34:54 +0000 (-0800) Subject: crimson/.../replicated_request: fix op lifetime in with_pg finally X-Git-Tag: testing/wip-hyelloji-testing-20250121.140335~1^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=321131660809c3f28c5956e4ea7512aeb0427a96;p=ceph-ci.git crimson/.../replicated_request: fix op lifetime in with_pg finally 02b70a62a4 moved the call to handle.complete() into the finally, but didn't extend the op ref lifetime until after the complete resolved. Signed-off-by: Samuel Just --- diff --git a/src/crimson/osd/osd_operations/replicated_request.cc b/src/crimson/osd/osd_operations/replicated_request.cc index ec607758c55..257d6779269 100644 --- a/src/crimson/osd/osd_operations/replicated_request.cc +++ b/src/crimson/osd/osd_operations/replicated_request.cc @@ -107,9 +107,10 @@ seastar::future<> RepRequest::with_pg( return with_pg_interruptible(pg); }, [](std::exception_ptr) { return seastar::now(); - }, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] { + }, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)]() mutable { logger().debug("{}: exit", *this); - return handle.complete(); + return handle.complete( + ).finally([ref=std::move(ref)] {}); }); }