auto o = get_osdmap();
if (o->require_osd_release >= ceph_release_t::luminous) {
pg_created.insert(pgid);
+ dout(20) << __func__ << " reply to mon " << pgid << " created." << dendl;
monc->send_mon_message(new MOSDPGCreated(pgid));
}
}
auto o = get_osdmap();
if (o->require_osd_release >= ceph_release_t::luminous) {
for (auto pgid : pg_created) {
+ dout(20) << __func__ << " reply to mon " << pgid << " created!" << dendl;
monc->send_mon_message(new MOSDPGCreated(pgid));
}
}
std::make_shared<PGPeeringEvent>(
m->epoch,
m->epoch,
- NullEvt(),
+ PgCreateEvt(),
true,
new PGCreateInfo(
pgid,
return discard_event();
}
+boost::statechart::result PeeringState::Active::react(const PgCreateEvt &evt)
+{
+ DECLARE_LOCALS;
+ pg_t pgid = context< PeeringMachine >().spgid.pgid;
+
+ psdout(10) << __func__ << " receive PgCreateEvt"
+ << " is_peered=" << ps->is_peered() << dendl;
+
+ if (ps->is_peered()) {
+ psdout(10) << __func__ << " pg is peered, reply pg_created" << dendl;
+ pl->send_pg_created(pgid);
+ }
+
+ return discard_event();
+}
+
/*
* update info.history.last_epoch_started ONLY after we and all
* replicas have activated AND committed the activate transaction
typedef boost::mpl::list <
boost::statechart::transition< Initialize, Reset >,
boost::statechart::custom_reaction< NullEvt >,
+ boost::statechart::custom_reaction< PgCreateEvt >,
boost::statechart::transition< boost::statechart::event_base, Crashed >
> reactions;
boost::statechart::custom_reaction< AdvMap >,
boost::statechart::custom_reaction< ActMap >,
boost::statechart::custom_reaction< NullEvt >,
+ boost::statechart::custom_reaction< PgCreateEvt >,
boost::statechart::custom_reaction< IntervalFlush >,
boost::statechart::transition< boost::statechart::event_base, Crashed >
> reactions;
boost::statechart::custom_reaction< IntervalFlush >,
// ignored
boost::statechart::custom_reaction< NullEvt >,
+ boost::statechart::custom_reaction< PgCreateEvt >,
boost::statechart::custom_reaction<SetForceRecovery>,
boost::statechart::custom_reaction<UnsetForceRecovery>,
boost::statechart::custom_reaction<SetForceBackfill>,
boost::statechart::custom_reaction< DoRecovery>,
boost::statechart::custom_reaction< RenewLease>,
boost::statechart::custom_reaction< MLeaseAck>,
- boost::statechart::custom_reaction< CheckReadable>
+ boost::statechart::custom_reaction< CheckReadable>,
+ boost::statechart::custom_reaction< PgCreateEvt >
> reactions;
boost::statechart::result react(const QueryState& q);
boost::statechart::result react(const QueryUnfound& q);
return discard_event();
}
boost::statechart::result react(const CheckReadable&);
+ boost::statechart::result react(const PgCreateEvt&);
void all_activated_and_committed();
};