if (scrbr->pending_active_pushes() == 0) {
// done waiting
- return transit<ActiveReplica>();
+ return transit<ReplicaBuildingMap>();
}
return discard_event();
return transit<NotActive>();
}
-// ----------------------- ActiveReplica -----------------------------------
+// ----------------------- ReplicaBuildingMap -----------------------------------
-ActiveReplica::ActiveReplica(my_context ctx)
+ReplicaBuildingMap::ReplicaBuildingMap(my_context ctx)
: my_base(ctx)
- , NamedSimply(context<ScrubMachine>().m_scrbr, "ActiveReplica")
+ , NamedSimply(context<ScrubMachine>().m_scrbr, "ReplicaBuildingMap")
{
DECLARE_LOCALS; // 'scrbr' & 'pg_id' aliases
- dout(10) << "-- state -->> ActiveReplica" << dendl;
+ dout(10) << "-- state -->> ReplicaBuildingMap" << dendl;
// and as we might have skipped ReplicaWaitUpdates:
scrbr->on_replica_init();
post_event(SchedReplica{});
}
-sc::result ActiveReplica::react(const SchedReplica&)
+sc::result ReplicaBuildingMap::react(const SchedReplica&)
{
DECLARE_LOCALS; // 'scrbr' & 'pg_id' aliases
- dout(10) << "ActiveReplica::react(const SchedReplica&). is_preemptable? "
+ dout(10) << "ReplicaBuildingMap::react(const SchedReplica&). is_preemptable? "
<< scrbr->get_preemptor().is_preemptable() << dendl;
if (scrbr->get_preemptor().was_preempted()) {
/**
* the event poster is handling the scrubber reset
*/
-sc::result ActiveReplica::react(const FullReset&)
+sc::result ReplicaBuildingMap::react(const FullReset&)
{
- dout(10) << "ActiveReplica::react(const FullReset&)" << dendl;
+ dout(10) << "ReplicaBuildingMap::react(const FullReset&)" << dendl;
return transit<NotActive>();
}
struct ActiveScrubbing; ///< the active state for a Primary. A sub-machine.
struct ReplicaWaitUpdates; ///< an active state for a replica. Waiting for all
///< active operations to finish.
-struct ActiveReplica; ///< an active state for a replica.
+struct ReplicaBuildingMap; ///< an active state for a replica.
class ScrubMachine : public sc::state_machine<ScrubMachine, NotActive> {
// a scrubbing that was initiated at recovery completion:
sc::custom_reaction<AfterRepairScrub>,
sc::transition<StartReplica, ReplicaWaitUpdates>,
- sc::transition<StartReplicaNoWait, ActiveReplica>>;
+ sc::transition<StartReplicaNoWait, ReplicaBuildingMap>>;
sc::result react(const StartScrub&);
sc::result react(const AfterRepairScrub&);
};
};
-struct ActiveReplica : sc::state<ActiveReplica, ScrubMachine>, NamedSimply {
- explicit ActiveReplica(my_context ctx);
+struct ReplicaBuildingMap : sc::state<ReplicaBuildingMap, ScrubMachine>, NamedSimply {
+ explicit ReplicaBuildingMap(my_context ctx);
using reactions = mpl::list<sc::custom_reaction<SchedReplica>,
sc::custom_reaction<FullReset>>;