]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../replicated_recovery_backend: route pushes earlier
authorSamuel Just <sjust@redhat.com>
Wed, 22 Jan 2025 02:47:09 +0000 (18:47 -0800)
committerSamuel Just <sjust@redhat.com>
Thu, 30 Jan 2025 22:51:35 +0000 (14:51 -0800)
Let ReplicatedRecoveryBackend::handle_recovery_op route pushes
between handle_push and handle_pull_response instead of
ReplicatedRecoveryBackend::handle_push.

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

index 3ca12126d4f066c2936426a2a30b8765a810cd51..85582e04033de973ece9ec0d9ae9744af304b5e2 100644 (file)
@@ -1030,10 +1030,6 @@ ReplicatedRecoveryBackend::handle_push(
   Ref<MOSDPGPush> m)
 {
   LOG_PREFIX(ReplicatedRecoveryBackend::handle_push);
-  if (pg.is_primary()) {
-    return handle_pull_response(m);
-  }
-
   DEBUGDPP("{}", pg, *m);
   return seastar::do_with(PushReplyOp(), [FNAME, this, m](auto& response) {
     PushOp& push_op = m->pushes[0]; // TODO: only one push per message for now
@@ -1349,7 +1345,12 @@ ReplicatedRecoveryBackend::handle_recovery_op(
   case MSG_OSD_PG_PULL:
     return handle_pull(boost::static_pointer_cast<MOSDPGPull>(m));
   case MSG_OSD_PG_PUSH:
-    return handle_push(boost::static_pointer_cast<MOSDPGPush>(m));
+    if (pg.is_primary()) {
+      return handle_pull_response(
+       boost::static_pointer_cast<MOSDPGPush>(m));
+    } else {
+      return handle_push(boost::static_pointer_cast<MOSDPGPush>(m));
+    }
   case MSG_OSD_PG_PUSH_REPLY:
     return handle_push_reply(
        boost::static_pointer_cast<MOSDPGPushReply>(m));