]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: implement ECRecoveryBackend::commit_txn_send_replies()
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 26 Mar 2024 14:25:18 +0000 (14:25 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 24 Mar 2026 16:06:24 +0000 (16:06 +0000)
This bypasses the crimson-msgr for local ops.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/ec_recovery_backend.cc

index 33f4276a34f64a0a35099c0ae29cdeaa7a845398..a258098a8b36e868d8e51fe5bedc79f732987278 100644 (file)
@@ -72,6 +72,22 @@ void ECRecoveryBackend::commit_txn_send_replies(
   ceph::os::Transaction&& txn,
   std::map<int, MOSDPGPushReply*> replies)
 {
+  std::ignore = shard_services.get_store().do_transaction(
+    ::RecoveryBackend::coll, std::move(txn)
+  ).then([replies=std::move(replies), this]() mutable {
+    if (auto msgit = replies.find(get_parent()->whoami_shard().osd);
+        msgit != std::end(replies)) {
+      std::ignore = handle_push_reply(Ref<MOSDPGPushReply>{msgit->second});
+      replies.erase(msgit);
+    }
+    return seastar::do_for_each(replies, [this] (auto&& kv) {
+      auto [osd, msg] = kv;
+      return pg.get_shard_services().send_to_osd(
+        osd,
+        MessageURef{msg},
+        pg.get_osdmap_epoch());
+    });
+  });
 }
 
 RecoveryBackend::interruptible_future<>