dout(10) << fmt::format(
"ReplicaActive::clear_remote_reservation(): "
"pending_reservation_nonce {}, reservation_granted {}",
- reservation_granted, pending_reservation_nonce)
+ pending_reservation_nonce, reservation_granted)
<< dendl;
if (reservation_granted || pending_reservation_nonce) {
m_osds->get_scrub_reserver().cancel_reservation(pg_id);
return transit<ReplicaActiveOp>();
}
+sc::result ReplicaActiveOp::react(const ReplicaRelease& ev)
+{
+ dout(10) << "ReplicaActiveOp::react(const ReplicaRelease&)" << dendl;
+ post_event(ev);
+ return transit<sc::shallow_history<ReplicaReserved>>();
+}
+
+
// ------------- ReplicaActive/ReplicaWaitUpdates ------------------------
ReplicaWaitUpdates::ReplicaWaitUpdates(my_context ctx)
using reactions = mpl::list<
sc::custom_reaction<StartReplica>,
+ sc::custom_reaction<ReplicaRelease>,
sc::transition<FullReset, ReplicaIdle>>;
/**
* - and we should log this unexpected scenario clearly in the cluster log.
*/
sc::result react(const StartReplica&);
+
+ /**
+ * a 'release' was send by the primary. Possible scenario: 'no-scrub'
+ * abort. Our two-steps reaction:
+ * - we exit the 'ActiveOp' state, and
+ * - we make sure the 'release' is remembered, to be handled by the state
+ * we would transition into (which should be ReplicaReserved).
+ */
+ sc::result react(const ReplicaRelease&);
};
/*