mon->timer.cancel_event(proposal_timer);
proposal_timer = 0;
}
- // ignore any callbacks waiting for us to finish our proposal
- waiting_for_finished_proposal.clear();
+
+ finish_contexts(g_ceph_context, waiting_for_finished_proposal, -EAGAIN);
on_restart();
}
}
proposing.set(0);
- // ignore any callbacks waiting for us to finish our proposal
- waiting_for_finished_proposal.clear();
+ finish_contexts(g_ceph_context, waiting_for_finished_proposal, -EAGAIN);
// make sure we update our state
if (is_active())
}
}
- /* wake people up before calling on_active(). We don't know how long we'll be
- * on the service's on_active(), and we really should wake people up!
- */
- wakeup_proposing_waiters();
+ // wake up anyone who came in while we were proposing. note that
+ // anyone waiting for the previous proposal to commit is no longer
+ // on this list; it is on Paxos's.
+ finish_contexts(g_ceph_context, waiting_for_finished_proposal, 0);
+
// NOTE: it's possible that this will get called twice if we commit
// an old paxos value. Implementations should be mindful of that.
if (is_active())
mon->timer.cancel_event(proposal_timer);
proposal_timer = 0;
}
- // ignore any callbacks waiting for us to finish our proposal
- waiting_for_finished_proposal.clear();
+
+ finish_contexts(g_ceph_context, waiting_for_finished_proposal, -EAGAIN);
}
void PaxosService::put_version(MonitorDBStore::Transaction *t,
return mon->store->get(get_service_name(), key, bl);
}
-void PaxosService::wakeup_proposing_waiters()
-{
- finish_contexts(g_ceph_context, waiting_for_finished_proposal);
-}
-
void PaxosService::trim(MonitorDBStore::Transaction *t,
version_t from, version_t to)
{