]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: fix the lifetime management of OpsExecuter.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 2 Jan 2020 12:31:48 +0000 (13:31 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 13 Feb 2020 23:11:41 +0000 (00:11 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/pg.cc

index 0dc06f561d0a70a365fdeedf91b4f1802479ab7f..40fbc948dc2bec5e1c9c620a90981a48d31aa296 100644 (file)
@@ -525,7 +525,7 @@ seastar::future<Ref<MOSDOpReply>> PG::do_osd_ops(
       obc->obs.oi.soid,
       ceph_osd_op_name(osd_op.op.op));
     return ox->execute_osd_op(osd_op);
-  }).safe_then([this, obc, m, ox = std::move(ox)] {
+  }).safe_then([this, obc, m, ox = ox.get()] {
     logger().debug(
       "do_osd_ops: {} - object {} all operations successful",
       *m,
@@ -547,7 +547,7 @@ seastar::future<Ref<MOSDOpReply>> PG::do_osd_ops(
           return submit_transaction(std::move(obc), std::move(txn), *m);
         }
       });
-  }).safe_then([m, obc, this] {
+  }).safe_then([m, obc, this, ox_deleter = std::move(ox)] {
     auto reply = make_message<MOSDOpReply>(m.get(), 0, get_osdmap_epoch(),
                                            0, false);
     reply->add_flags(CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK);