]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../snaptrim_event: no need to recover missing, pg must be clean
authorSamuel Just <sjust@redhat.com>
Tue, 28 May 2024 20:47:52 +0000 (13:47 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 13 Jun 2024 18:43:43 +0000 (11:43 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/osd_operations/snaptrim_event.cc
src/crimson/osd/osd_operations/snaptrim_event.h
src/crimson/osd/pg.h

index 1f2841361051da0aae37b56fcdc6348b40169335..fabf2b0eb7aa4bc89ff0427249c5367ba2ccde87 100644 (file)
@@ -65,6 +65,8 @@ CommonPGPipeline& SnapTrimEvent::client_pp()
 SnapTrimEvent::snap_trim_event_ret_t
 SnapTrimEvent::start()
 {
+  ceph_assert(pg->is_active_clean());
+
   auto exit_handle = seastar::defer([this] {
     logger().debug("{}: exit", *this);
     handle.exit();
@@ -78,11 +80,6 @@ SnapTrimEvent::start()
       return pg->wait_for_active_blocker.wait(std::move(trigger));
     });
 
-  co_await enter_stage<interruptor>(
-    client_pp().recover_missing);
-
-  // co_await do_recover_missing(pg, get_target_oid());
-  
   co_await enter_stage<interruptor>(
     client_pp().get_obc);
 
@@ -414,6 +411,8 @@ SnapTrimObjSubEvent::remove_or_update(
 SnapTrimObjSubEvent::snap_trim_obj_subevent_ret_t
 SnapTrimObjSubEvent::start()
 {
+  ceph_assert(pg->is_active_clean());
+
   auto exit_handle = seastar::defer([this] {
     logger().debug("{}: exit", *this);
     handle.exit();
@@ -428,11 +427,6 @@ SnapTrimObjSubEvent::start()
       return pg->wait_for_active_blocker.wait(std::move(trigger));
     });
 
-  co_await enter_stage<interruptor>(
-    client_pp().recover_missing);
-
-  // co_await do_recover_missing(pg, get_target_oid());
-
   co_await enter_stage<interruptor>(
     client_pp().get_obc);
 
index 9d7cde724ef781919b5673c19c510e31d52651c2..759e000ff27e6a566323284bf15b4c4f12ff1ab6 100644 (file)
@@ -87,7 +87,6 @@ public:
     StartEvent,
     CommonPGPipeline::WaitForActive::BlockingEvent,
     PGActivationBlocker::BlockingEvent,
-    CommonPGPipeline::RecoverMissing::BlockingEvent,
     CommonPGPipeline::GetOBC::BlockingEvent,
     CommonPGPipeline::Process::BlockingEvent,
     WaitSubop::BlockingEvent,
@@ -194,7 +193,6 @@ public:
     StartEvent,
     CommonPGPipeline::WaitForActive::BlockingEvent,
     PGActivationBlocker::BlockingEvent,
-    CommonPGPipeline::RecoverMissing::BlockingEvent,
     CommonPGPipeline::GetOBC::BlockingEvent,
     CommonPGPipeline::Process::BlockingEvent,
     WaitRepop::BlockingEvent,
index d705a71bb785d1f4051895cf8288779dabddf25d..6e80d464fc596ff7e6498386c9f4c7ffa7b6d282 100644 (file)
@@ -437,6 +437,9 @@ public:
 
 
   // Utility
+  bool is_active_clean() const {
+    return peering_state.is_active() && peering_state.is_clean();
+  }
   bool is_primary() const final {
     return peering_state.is_primary();
   }