]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: convert InternalClientRequest::do_request to use *_executer rather than...
authorSamuel Just <sjust@redhat.com>
Thu, 26 Sep 2024 22:43:35 +0000 (22:43 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 15 Oct 2024 03:37:26 +0000 (20:37 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/osd_operations/internal_client_request.cc

index d0ee392ecb6386ded06e8a632cdd691d2396d1b4..6ad447cf32ee42c9c0dada8693ec7d0dd702c8c2 100644 (file)
@@ -55,23 +55,26 @@ InternalClientRequest::do_process(
   crimson::osd::ObjectContextRef obc,
   std::vector<OSDOp> &osd_ops)
 {
-  return pg->do_osd_ops(
-    std::move(obc),
-    osd_ops,
-    std::as_const(op_info),
-    get_do_osd_ops_params()
-  ).safe_then_unpack_interruptible(
-    [](auto submitted, auto all_completed) {
-      return all_completed.handle_error_interruptible(
-       crimson::ct_error::eagain::handle([] {
-         ceph_assert(0 == "not handled");
-         return seastar::now();
-       }));
-    }, crimson::ct_error::eagain::handle([] {
-      ceph_assert(0 == "not handled");
-      return interruptor::now();
-    })
+  LOG_PREFIX(InternalClientRequest::do_process);
+  auto params = get_do_osd_ops_params();
+  auto ox = seastar::make_lw_shared<OpsExecuter>(
+    pg, obc, op_info, params, params.get_connection(), SnapContext{});
+  co_await pg->run_executer(
+    ox, obc, op_info, osd_ops
+  ).handle_error_interruptible(
+    crimson::ct_error::all_same_way(
+      [this, FNAME](auto e) {
+       ERRORDPPI("{}: got unexpected error {}", *pg, *this, e);
+       ceph_assert(0 == "should not return an error");
+       return interruptor::now();
+      })
   );
+
+  auto [submitted, completed] = co_await pg->submit_executer(
+    std::move(ox), osd_ops);
+
+  co_await std::move(submitted);
+  co_await std::move(completed);
 }
 
 InternalClientRequest::interruptible_future<>