t.touch(coll_t::META_COLL, log_oid);
write_info(t);
store->apply_transaction(t);
+
+ // Generate a backlog
+ osd->queue_generate_backlog(this);
+ while (!info.log_backlog)
+ wait(); // See RecoverState::Initial, kick() is called in
+ // the BacklogComplete callback
}
// log any weirdness
return transit< Stray >();
}
+boost::statechart::result
+PG::RecoveryState::Initial::react(const BacklogComplete&) {
+ PG *pg = context< RecoveryMachine >().pg;
+ pg->kick(); // See read_state, wakes up thread waiting on backlog for
+ // corrupt log
+ return discard_event();
+}
+
void PG::RecoveryState::Initial::exit() {
PG *pg = context< RecoveryMachine >().pg;
pg->reset_last_warm_restart();
boost::statechart::custom_reaction< MNotifyRec >,
boost::statechart::custom_reaction< MInfoRec >,
boost::statechart::custom_reaction< MLogRec >,
+ boost::statechart::custom_reaction< BacklogComplete >,
boost::statechart::transition< boost::statechart::event_base, Crashed >
> reactions;
boost::statechart::result react(const MNotifyRec&);
boost::statechart::result react(const MInfoRec&);
boost::statechart::result react(const MLogRec&);
+ boost::statechart::result react(const BacklogComplete&);
};
struct Reset : boost::statechart::state< Reset, RecoveryMachine >, NamedState {