At FlushedEvt, all outstanding io should be complete and
the object_contexts map should be empty.
Signed-off-by: Samuel Just <sam.just@inktank.com>
{
PG *pg = context< RecoveryMachine >().pg;
pg->flushed = true;
+ pg->on_flushed();
pg->requeue_ops(pg->waiting_for_active);
return discard_event();
}
virtual void on_role_change() = 0;
virtual void on_change() = 0;
virtual void on_activate() = 0;
+ virtual void on_flushed() = 0;
virtual void on_shutdown() = 0;
virtual void remove_watchers_and_notifies() = 0;
remove_watchers_and_notifies();
}
+void ReplicatedPG::on_flushed()
+{
+ assert(object_contexts.empty());
+}
+
void ReplicatedPG::on_activate()
{
for (unsigned i = 1; i<acting.size(); i++) {
void on_role_change();
void on_change();
void on_activate();
+ void on_flushed();
void on_removal();
void on_shutdown();
};