]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PeeringState: handle race condition of RemoteReservationRevoked event for Backfil... 67122/head
authorNaveen Naidu <naveennaidu479@gmail.com>
Thu, 29 Jan 2026 13:10:54 +0000 (18:40 +0530)
committerNaveen Naidu <naveennaidu479@gmail.com>
Thu, 29 Jan 2026 13:15:37 +0000 (18:45 +0530)
Currently When `RemoteReservationRevoked` races with
`MOSDPGBackfill::OP_BACKFILL_FINISH`, the PG sate gets updated to
`backfill_wait`, backfill is suspended and the event is discarded. Note
that we have not rescheduled a backfill to  happen again. This can lead
to the PG getting stuck in `backfill_Wait` forever.

Closes: https://tracker.ceph.com/issues/71493
Signed-off-by: Naveen Naidu <naveen.naidu@ibm.com>
src/osd/PeeringState.cc

index b6a7ceeec726204c1bf7339701884e04408d01d7..5dea950f466f6aa2ea9737460d31a03a654948df 100644 (file)
@@ -5678,9 +5678,9 @@ boost::statechart::result
 PeeringState::Backfilling::react(const RemoteReservationRevoked &)
 {
   DECLARE_LOCALS;
-  ps->state_set(PG_STATE_BACKFILL_WAIT);
-  suspend_backfill();
   if (ps->needs_backfill()) {
+    ps->state_set(PG_STATE_BACKFILL_WAIT);
+    suspend_backfill();
     return transit<WaitLocalBackfillReserved>();
   } else {
     // raced with MOSDPGBackfill::OP_BACKFILL_FINISH, ignore