]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/.../client_request: extend instance_handle lifetime
authorSamuel Just <sjust@redhat.com>
Thu, 14 Nov 2024 22:53:22 +0000 (14:53 -0800)
committerSamuel Just <sjust@redhat.com>
Tue, 10 Dec 2024 15:32:43 +0000 (15:32 +0000)
We're going to need instance_handle to outlive exiting the
pipeline stage as it will later hold a reference to an
obc holding that stage.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/osd_operations/client_request.cc

index 61a56600a57040bd1ec9b82185cbddc107cdefe4..a4f48b72318b3e8ecbbea1e69dfa4cb3f6df85a3 100644 (file)
@@ -268,9 +268,10 @@ seastar::future<> ClientRequest::with_pg_process(
               *pgref, *this, this_instance_id, eptr);
     }, pgref, pgref->get_osdmap_epoch()).finally(
       [this, FNAME, opref=std::move(opref), pgref,
-       this_instance_id, instance_handle=std::move(instance_handle), &ihref] {
+       this_instance_id, instance_handle=std::move(instance_handle), &ihref]() mutable {
        DEBUGDPP("{}.{}: exit", *pgref, *this, this_instance_id);
-       ihref.handle.exit();
+       return ihref.handle.complete(
+       ).finally([instance_handle=std::move(instance_handle)] {});
     });
 }