Skip to content

Commit 3211316

Browse files
committed
crimson/.../replicated_request: fix op lifetime in with_pg finally
02b70a6 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 <[email protected]>
1 parent 7d29ca7 commit 3211316

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/crimson/osd/osd_operations/replicated_request.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ seastar::future<> RepRequest::with_pg(
107107
return with_pg_interruptible(pg);
108108
}, [](std::exception_ptr) {
109109
return seastar::now();
110-
}, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] {
110+
}, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)]() mutable {
111111
logger().debug("{}: exit", *this);
112-
return handle.complete();
112+
return handle.complete(
113+
).finally([ref=std::move(ref)] {});
113114
});
114115
}
115116

0 commit comments

Comments
 (0)