// am i broken?
if (pg->info.last_update < best.log_tail) {
dout(10) << " not contiguous with osd." << newest_update_osd << ", down" << dendl;
- /*post_event(...something...); */
-#warning fixme need an event here?
+ post_event(IsIncomplete());
return;
}
context< RecoveryMachine >().log_exit(state_name, enter_time);
}
+/*------Incomplete--------*/
+PG::RecoveryState::Incomplete::Incomplete(my_context ctx) : my_base(ctx)
+{
+ state_name = "Started/Primary/Peering/Incomplete";
+ context< RecoveryMachine >().log_enter(state_name);
+}
+void PG::RecoveryState::Incomplete::exit() {
+ context< RecoveryMachine >().log_exit(state_name, enter_time);
+}
+
/*------GetMissing--------*/
PG::RecoveryState::GetMissing::GetMissing(my_context ctx) : my_base(ctx)
{
struct NeedNewMap : boost::statechart::event< NeedNewMap > {
NeedNewMap() : boost::statechart::event< NeedNewMap >() {}
};
+ struct Incomplete;
+ struct IsIncomplete : boost::statechart::event< IsIncomplete > {
+ IsIncomplete() : boost::statechart::event< IsIncomplete >() {}
+ };
struct Primary : boost::statechart::state< Primary, Started, Peering >, NamedState {
Primary(my_context ctx);
boost::statechart::custom_reaction< ActMap >,
boost::statechart::custom_reaction< MNotifyRec >,
boost::statechart::custom_reaction< AdvMap >,
- boost::statechart::transition< NeedNewMap, WaitActingChange >
+ boost::statechart::transition< NeedNewMap, WaitActingChange >,
+ boost::statechart::transition< IsIncomplete, Incomplete >
> reactions;
boost::statechart::result react(const ActMap&);
boost::statechart::result react(const AdvMap&);
boost::statechart::result react(const MLogRec&);
void exit();
};
+
+ struct Incomplete : boost::statechart::state< Incomplete, Primary>,
+ NamedState {
+ Incomplete(my_context ctx);
+ void exit();
+ };
struct GetInfo;
struct Active;