From: Sage Weil Date: Tue, 25 Jun 2013 18:58:22 +0000 (-0700) Subject: mon/Paxos: drop unnecessary last_committed loads X-Git-Tag: v0.67-rc1~175^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11e03253726edfad0d1b9e9faf21914e5b062c90;p=ceph.git mon/Paxos: drop unnecessary last_committed loads Drop (apparently) ad-hoc refreshes of last_committed from the store. These are unnecessary and confusing. Signed-off-by: Sage Weil --- diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index de6641663ca6..2a324c97236d 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -327,9 +327,6 @@ void Paxos::store_state(MMonPaxos *m) get_store()->apply_transaction(t); - // update the first and last committed in-memory values. - first_committed = get_store()->get(get_name(), "first_committed"); - last_committed = get_store()->get(get_name(), "last_committed"); } if (get_store()->exists(get_name(), "conversion_first")) { @@ -808,18 +805,6 @@ void Paxos::finish_proposal() dout(10) << __func__ << " state " << state << " proposals left " << proposals.size() << dendl; - /* Update the internal Paxos state. - * - * Since we moved to a single-paxos instance across all monitor services, we - * can no longer rely on each individual service to update paxos state. - * Therefore, once we conclude a proposal, we must update our internal - * state (say, such variables as 'first_committed'), because no one else - * will take care of that for us -- and we rely on these variables for - * several other mechanisms; trimming comes to mind. - */ - first_committed = get_store()->get(get_name(), "first_committed"); - last_committed = get_store()->get(get_name(), "last_committed"); - if (need_bootstrap) { dout(10) << " doing requested bootstrap" << dendl; mon->bootstrap();