mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
osd/PG: handle racy preemption
If we finish recovery/backfill and go active, but also get preempted at the same time, we can ignore the event. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
a8534cce1a
commit
d8c3756d26
20
src/osd/PG.h
20
src/osd/PG.h
@ -1846,7 +1846,9 @@ public:
|
||||
boost::statechart::custom_reaction< MNotifyRec >,
|
||||
boost::statechart::custom_reaction< MLogRec >,
|
||||
boost::statechart::custom_reaction< Backfilled >,
|
||||
boost::statechart::custom_reaction< AllReplicasActivated >
|
||||
boost::statechart::custom_reaction< AllReplicasActivated >,
|
||||
boost::statechart::custom_reaction< DeferRecovery >,
|
||||
boost::statechart::custom_reaction< DeferBackfill >
|
||||
> reactions;
|
||||
boost::statechart::result react(const QueryState& q);
|
||||
boost::statechart::result react(const ActMap&);
|
||||
@ -1858,6 +1860,12 @@ public:
|
||||
return discard_event();
|
||||
}
|
||||
boost::statechart::result react(const AllReplicasActivated&);
|
||||
boost::statechart::result react(const DeferRecovery& evt) {
|
||||
return discard_event();
|
||||
}
|
||||
boost::statechart::result react(const DeferBackfill& evt) {
|
||||
return discard_event();
|
||||
}
|
||||
};
|
||||
|
||||
struct Clean : boost::statechart::state< Clean, Active >, NamedState {
|
||||
@ -1951,7 +1959,9 @@ public:
|
||||
boost::statechart::custom_reaction< MQuery >,
|
||||
boost::statechart::custom_reaction< MInfoRec >,
|
||||
boost::statechart::custom_reaction< MLogRec >,
|
||||
boost::statechart::custom_reaction< Activate >
|
||||
boost::statechart::custom_reaction< Activate >,
|
||||
boost::statechart::custom_reaction< DeferRecovery >,
|
||||
boost::statechart::custom_reaction< DeferBackfill >
|
||||
> reactions;
|
||||
boost::statechart::result react(const QueryState& q);
|
||||
boost::statechart::result react(const MInfoRec& infoevt);
|
||||
@ -1959,6 +1969,12 @@ public:
|
||||
boost::statechart::result react(const ActMap&);
|
||||
boost::statechart::result react(const MQuery&);
|
||||
boost::statechart::result react(const Activate&);
|
||||
boost::statechart::result react(const DeferRecovery& evt) {
|
||||
return discard_event();
|
||||
}
|
||||
boost::statechart::result react(const DeferBackfill& evt) {
|
||||
return discard_event();
|
||||
}
|
||||
};
|
||||
|
||||
struct RepRecovering : boost::statechart::state< RepRecovering, ReplicaActive >, NamedState {
|
||||
|
Loading…
Reference in New Issue
Block a user