]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../client_request: make reply_op_error return interruptible_future<>
authorSamuel Just <sjust@redhat.com>
Wed, 7 Feb 2024 01:19:13 +0000 (17:19 -0800)
committerSamuel Just <sjust@redhat.com>
Mon, 1 Apr 2024 23:11:33 +0000 (16:11 -0700)
co_await can't implicitely convert it.

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

index 0574a1bcfe5e29deb54b8128b38ed6c6b2606333..2f71cdacd3a87790a37478ed549900fe107d73b0 100644 (file)
@@ -209,7 +209,8 @@ ClientRequest::process_pg_op(
     get_foreign_connection().send_with_throttling(std::move(reply)));
 }
 
-auto ClientRequest::reply_op_error(const Ref<PG>& pg, int err)
+ClientRequest::interruptible_future<>
+ClientRequest::reply_op_error(const Ref<PG>& pg, int err)
 {
   LOG_PREFIX(ClientRequest::reply_op_error);
   DEBUGDPP("{}: replying with error {}", *pg, *this, err);
@@ -220,7 +221,9 @@ auto ClientRequest::reply_op_error(const Ref<PG>& pg, int err)
   reply->set_reply_versions(eversion_t(), 0);
   reply->set_op_returns(std::vector<pg_log_op_return_item_t>{});
   // TODO: gate the crosscore sending
-  return get_foreign_connection().send_with_throttling(std::move(reply));
+  return interruptor::make_interruptible(
+    get_foreign_connection().send_with_throttling(std::move(reply))
+  );
 }
 
 ClientRequest::interruptible_future<>
index 67c3c9b1228d0fb75044a58c00b2fde32b8b3194..358a6bbe44e579c41189d502ec4df19cc07cf55d 100644 (file)
@@ -265,7 +265,7 @@ public:
 private:
   template <typename FuncT>
   interruptible_future<> with_sequencer(FuncT&& func);
-  auto reply_op_error(const Ref<PG>& pg, int err);
+  interruptible_future<> reply_op_error(const Ref<PG>& pg, int err);
 
   interruptible_future<> do_process(
     instance_handle_t &ihref,