]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../replicated_request: do commit in concurrent phase 61086/head
authorSamuel Just <sjust@redhat.com>
Sat, 14 Dec 2024 03:31:58 +0000 (19:31 -0800)
committerSamuel Just <sjust@redhat.com>
Tue, 17 Dec 2024 17:14:28 +0000 (09:14 -0800)
This allows pipelineing for the actual commit.

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

index 2897a7e16237a1b28d1bff89eeda774636738fe8..f8815a316d12cc368616459c40c4e68a2db748ff 100644 (file)
@@ -62,6 +62,12 @@ struct PGRepopPipeline {
   struct Process : OrderedExclusivePhaseT<Process> {
     static constexpr auto type_name = "PGRepopPipeline::process";
   } process;
+  struct WaitCommit : OrderedConcurrentPhaseT<WaitCommit> {
+    static constexpr auto type_name = "PGRepopPipeline::wait_repop";
+  } wait_commit;
+  struct SendReply : OrderedExclusivePhaseT<SendReply> {
+    static constexpr auto type_name = "PGRepopPipeline::send_reply";
+  } send_reply;
 };
 
 struct CommonOBCPipeline {
index 8dd17bb036d0d386bad65a65ad2f9a17ed93676d..6a2d7e3ccbd164d40a51751171e3c0ce63d51894 100644 (file)
@@ -38,7 +38,10 @@ struct LttngBackend
     CommonOBCPipeline::WaitRepop::BlockingEvent::Backend,
     CommonOBCPipeline::WaitRepop::BlockingEvent::ExitBarrierEvent::Backend,
     CommonOBCPipeline::SendReply::BlockingEvent::Backend,
-    PGRepopPipeline::Process::BlockingEvent::Backend
+    PGRepopPipeline::Process::BlockingEvent::Backend,
+    PGRepopPipeline::WaitCommit::BlockingEvent::Backend,
+    PGRepopPipeline::WaitCommit::BlockingEvent::ExitBarrierEvent::Backend,
+    PGRepopPipeline::SendReply::BlockingEvent::Backend
 {
   void handle(ClientRequest::StartEvent&,
               const Operation&) override {}
@@ -126,6 +129,20 @@ struct LttngBackend
               const PGRepopPipeline::Process& blocker) override {
   }
 
+  void handle(PGRepopPipeline::WaitCommit::BlockingEvent& ev,
+              const Operation& op,
+              const PGRepopPipeline::WaitCommit& blocker) override {
+  }
+
+  void handle(PGRepopPipeline::WaitCommit::BlockingEvent::ExitBarrierEvent& ev,
+              const Operation& op) override {
+  }
+
+  void handle(PGRepopPipeline::SendReply::BlockingEvent& ev,
+              const Operation& op,
+              const PGRepopPipeline::SendReply& blocker) override {
+  }
+
   void handle(ClientRequest::CompletionEvent&,
               const Operation&) override {}
 
@@ -150,7 +167,10 @@ struct HistoricBackend
     CommonOBCPipeline::WaitRepop::BlockingEvent::Backend,
     CommonOBCPipeline::WaitRepop::BlockingEvent::ExitBarrierEvent::Backend,
     CommonOBCPipeline::SendReply::BlockingEvent::Backend,
-    PGRepopPipeline::Process::BlockingEvent::Backend
+    PGRepopPipeline::Process::BlockingEvent::Backend,
+    PGRepopPipeline::WaitCommit::BlockingEvent::Backend,
+    PGRepopPipeline::WaitCommit::BlockingEvent::ExitBarrierEvent::Backend,
+    PGRepopPipeline::SendReply::BlockingEvent::Backend
 {
   void handle(ClientRequest::StartEvent&,
               const Operation&) override {}
@@ -246,6 +266,21 @@ struct HistoricBackend
               const PGRepopPipeline::Process& blocker) override {
   }
 
+  void handle(PGRepopPipeline::WaitCommit::BlockingEvent& ev,
+              const Operation& op,
+              const PGRepopPipeline::WaitCommit& blocker) override {
+  }
+
+  void handle(PGRepopPipeline::WaitCommit::BlockingEvent::ExitBarrierEvent& ev,
+              const Operation& op) override {
+  }
+
+  void handle(PGRepopPipeline::SendReply::BlockingEvent& ev,
+              const Operation& op,
+              const PGRepopPipeline::SendReply& blocker) override {
+  }
+
+
   void handle(ClientRequest::CompletionEvent&, const Operation& op) override {
     if (crimson::common::local_conf()->osd_op_history_size) {
       to_client_request(op).put_historic();
index 0eb1a270db2f98dbc52a9e2f0410ae2f1868b30e..ec607758c55fdd759f1dd132c550bf7b5e25a3f5 100644 (file)
@@ -83,8 +83,14 @@ RepRequest::interruptible_future<> RepRequest::with_pg_interruptible(
 
   auto [commit_fut, reply] = co_await pg->handle_rep_op(req);
 
+  // Transitions from OrderedExclusive->OrderedConcurrent cannot block
+  this->template enter_stage_sync(repop_pipeline(*pg).wait_commit);
+
   co_await std::move(commit_fut);
 
+  co_await this->template enter_stage<interruptor>(
+    repop_pipeline(*pg).send_reply);
+
   co_await interruptor::make_interruptible(
     pg->shard_services.send_to_osd(
       req->from.osd, std::move(reply), pg->get_osdmap_epoch())
index 3609a51e96f311c50f26fdf00017ca897795afd6..37d2771a33b5b60ad7005a31e9956eff48c449ca 100644 (file)
@@ -81,6 +81,8 @@ public:
     ConnectionPipeline::GetPGMapping::BlockingEvent,
     PerShardPipeline::CreateOrWaitPG::BlockingEvent,
     PGRepopPipeline::Process::BlockingEvent,
+    PGRepopPipeline::WaitCommit::BlockingEvent,
+    PGRepopPipeline::SendReply::BlockingEvent,
     PG_OSDMapGate::OSDMapBlocker::BlockingEvent,
     PGMap::PGCreationBlockingEvent,
     OSD_OSDMapGate::OSDMapBlocker::BlockingEvent