Skip to content

Commit fc52858

Browse files
committed
crimson/.../replicated_request: hold pg ref until complete() resolves
02b70a6 moved the call to complete() into the finally block, so we need to hold a reference to the pg until the complete() resolves. Signed-off-by: Samuel Just <[email protected]>
1 parent 3211316 commit fc52858

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,10 +107,11 @@ 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)]() mutable {
110+
}, pg, pg->get_osdmap_epoch()
111+
).finally([this, pg, ref=std::move(ref)]() mutable {
111112
logger().debug("{}: exit", *this);
112113
return handle.complete(
113-
).finally([ref=std::move(ref)] {});
114+
).finally([ref=std::move(ref), pg=std::move(pg)] {});
114115
});
115116
}
116117

0 commit comments

Comments
 (0)