From: Neha Date: Tue, 25 Feb 2020 03:01:41 +0000 (+0000) Subject: osd/PeeringState.h: ignore RemoteBackfillReserved in WaitLocalBackfillReserved X-Git-Tag: v15.1.1~256^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33525%2Fhead;p=ceph.git osd/PeeringState.h: ignore RemoteBackfillReserved in WaitLocalBackfillReserved 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 --- diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index 4b73182870a..59eb5a5a4df 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -938,9 +938,14 @@ public: 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(); };