From: Sage Weil Date: Tue, 13 Jan 2015 13:38:19 +0000 (-0800) Subject: mon/Paxos: consolidate finish_round() X-Git-Tag: v0.93~275^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3358%2Fhead;p=ceph.git mon/Paxos: consolidate finish_round() Signed-off-by: Sage Weil --- diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 2bd0893d210..297ea17ce07 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -568,12 +568,6 @@ void Paxos::handle_last(MMonPaxos *last) need_refresh = false; if (do_refresh()) { finish_round(); - - finish_contexts(g_ceph_context, waiting_for_active); - finish_contexts(g_ceph_context, waiting_for_readable); - finish_contexts(g_ceph_context, waiting_for_writeable); - - maybe_propose_pending(); } } } @@ -917,13 +911,6 @@ void Paxos::commit_finish() assert(g_conf->paxos_kill_at != 10); finish_round(); - - // wake (other) people up - finish_contexts(g_ceph_context, waiting_for_active); - finish_contexts(g_ceph_context, waiting_for_readable); - finish_contexts(g_ceph_context, waiting_for_writeable); - - maybe_propose_pending(); } } @@ -1051,11 +1038,15 @@ void Paxos::finish_round() // ok, now go active! state = STATE_ACTIVE; -} -void Paxos::maybe_propose_pending() -{ - dout(10) << __func__ << " state " << state << dendl; + dout(20) << __func__ << " waiting_for_acting" << dendl; + finish_contexts(g_ceph_context, waiting_for_active); + dout(20) << __func__ << " waiting_for_readable" << dendl; + finish_contexts(g_ceph_context, waiting_for_readable); + dout(20) << __func__ << " waiting_for_writeable" << dendl; + finish_contexts(g_ceph_context, waiting_for_writeable); + + dout(10) << __func__ << " done w/ waiters, state " << state << dendl; if (should_trim()) { trim(); diff --git a/src/mon/Paxos.h b/src/mon/Paxos.h index 1bb710b4ccd..457c8af1d26 100644 --- a/src/mon/Paxos.h +++ b/src/mon/Paxos.h @@ -1081,14 +1081,6 @@ private: void commit_proposal(); void finish_round(); - /** - * propose pending, if any - * - * This is called at the end of the round to check if there is another - * pending proposal ready to go. - */ - void maybe_propose_pending(); - public: /** * @param m A monitor