]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PeeringState.h: ignore RemoteBackfillReserved in WaitLocalBackfillReserved 34512/head
authorNeha <nojha@redhat.com>
Tue, 25 Feb 2020 03:01:41 +0000 (03:01 +0000)
committerVicente Cheng <freeze.bilsted@gmail.com>
Fri, 10 Apr 2020 15:18:37 +0000 (15:18 +0000)
It is possible to dequeue an outstanding RemoteBackfillReserved, though we may have
already released reservations for that backfill target. Currently, if this happens
while we are in WaitLocalBackfillReserved, it can lead to a crash on the primary.
Prevent this by treating this condition as a no-op.

The longer term fix is to add a RELEASE_ACK mechanism, which prevents the primary
from scheduling a backfill retry until all the RELEASE_ACKs have been received.

Fixes: https://tracker.ceph.com/issues/44248
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 61152ac29654a819eb961e5fc2d7f63b706e15c9)

Conflicts:
src/osd/PeeringState.h
  - The RemoteBackfillReserved still in src/osd/PG.h in nautilus.
            Manually backport this fix to src/osd/PG.h

src/osd/PG.h

index 4857250d073962691272d71da8a02b2b74f11ab0..ae8aa7e7a9e7f5e4d55201b985a99a47febcbcd1 100644 (file)
@@ -2471,9 +2471,14 @@ protected:
 
     struct WaitLocalBackfillReserved : boost::statechart::state< WaitLocalBackfillReserved, Active >, NamedState {
       typedef boost::mpl::list<
-       boost::statechart::transition< LocalBackfillReserved, WaitRemoteBackfillReserved >
+       boost::statechart::transition< LocalBackfillReserved, WaitRemoteBackfillReserved >,
+       boost::statechart::custom_reaction< RemoteBackfillReserved >
        > reactions;
       explicit WaitLocalBackfillReserved(my_context ctx);
+      boost::statechart::result react(const RemoteBackfillReserved& evt) {
+       /* no-op */
+       return discard_event();
+      }
       void exit();
     };