]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/osd: add more logs to the AllReplicasRecovered handler 68306/head
authorShraddha Agrawal <shraddha.agrawal000@gmail.com>
Fri, 10 Apr 2026 09:39:41 +0000 (15:09 +0530)
committerShraddha Agrawal <shraddha.agrawal000@gmail.com>
Fri, 10 Apr 2026 09:39:41 +0000 (15:09 +0530)
This PR adds more logs around AllReplicasRecovered Handler to
verify the race between this and defer recovery.

Signed-off-by: Shraddha Agrawal <shraddha.agrawal000@gmail.com>
src/crimson/osd/pg_recovery.cc
src/osd/PeeringState.cc

index a225e6218d3bdcb8b8398b44fd37343117760b87..0ff4abc8518f00055af3cc3867243ee25d2e1b76 100644 (file)
@@ -688,7 +688,7 @@ void PGRecovery::request_backfill()
 void PGRecovery::all_replicas_recovered()
 {
   LOG_PREFIX(PGRecovery::all_replicas_recovered);
-  DEBUGDPP("", *pg->get_dpp());
+  DEBUGDPP("posting AllReplicasRecovered event", *pg->get_dpp());
   start_peering_event_operation_listener(PeeringState::AllReplicasRecovered());
 }
 
index 999c86f62a711b2207243c22e9843cfd61c93510..bcd56504943e2ae8c2081c097efc73e923e3864e 100644 (file)
@@ -6361,6 +6361,7 @@ boost::statechart::result
 PeeringState::Recovering::react(const AllReplicasRecovered &evt)
 {
   DECLARE_LOCALS;
+  psdout(10) << "handling AllReplicasRecovered" << dendl;
   ps->state_clear(PG_STATE_FORCED_RECOVERY);
   release_reservations();
   pl->cancel_local_background_io_reservation();
@@ -6409,6 +6410,8 @@ PeeringState::Recovering::react(const DeferRecovery &evt)
       ps->get_osdmap_epoch(),
       DoRecovery()),
     evt.delay);
+  psdout(10) << "DeferRecovery: transitioning to NotRecovering, "
+            << "any pending AllReplicasRecovered will be lost" << dendl;
   return transit<NotRecovering>();
 }
 
@@ -6444,6 +6447,8 @@ PeeringState::Recovered::Recovered(my_context ctx)
 
   DECLARE_LOCALS;
 
+  psdout(10) << "Recovered::Recovered: entering Recovered state" << dendl;
+
   ceph_assert(!ps->needs_recovery());
 
   // if we finished backfill, all acting are active; recheck if
@@ -6467,6 +6472,8 @@ PeeringState::Recovered::Recovered(my_context ctx)
   if (context< Active >().all_replicas_activated  &&
       ps->async_recovery_targets.empty())
     post_event(GoClean());
+
+  psdout(10) << "Recovered::Recovered: exiting Recovered constructor" << dendl;
 }
 
 void PeeringState::Recovered::exit()