]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Paxos: drop unnecessary last_committed loads
authorSage Weil <sage@inktank.com>
Tue, 25 Jun 2013 18:58:22 +0000 (11:58 -0700)
committerSage Weil <sage@inktank.com>
Wed, 26 Jun 2013 04:25:04 +0000 (21:25 -0700)
Drop (apparently) ad-hoc refreshes of last_committed from the store.
These are unnecessary and confusing.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Paxos.cc

index de6641663ca6eb0219e283b772ff47a33cedb8ae..2a324c97236d05af0fd2873fa7dd1a75b4d4032c 100644 (file)
@@ -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();