]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: paxos: queue next proposal after waking up callbacks
authorJoao Eduardo Luis <joao@redhat.com>
Thu, 8 Jan 2015 22:40:24 +0000 (22:40 +0000)
committerSage Weil <sage@redhat.com>
Sat, 10 Jan 2015 01:41:17 +0000 (17:41 -0800)
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
src/mon/Paxos.cc
src/mon/Paxos.h

index b677d01cc5703396d5b3c159916b95d0651ff916..6f3a544199012da1816d8fe00a44c88c7b32ae51 100644 (file)
@@ -572,6 +572,8 @@ void Paxos::handle_last(MMonPaxos *last)
          finish_contexts(g_ceph_context, waiting_for_active);
          finish_contexts(g_ceph_context, waiting_for_readable);
          finish_contexts(g_ceph_context, waiting_for_writeable);
+
+          queue_next();
        }
       }
     }
@@ -920,6 +922,8 @@ void Paxos::commit_finish()
     finish_contexts(g_ceph_context, waiting_for_active);
     finish_contexts(g_ceph_context, waiting_for_readable);
     finish_contexts(g_ceph_context, waiting_for_writeable);
+
+    queue_next();
   }
 }
 
@@ -1053,11 +1057,15 @@ void Paxos::commit_proposal()
 
 void Paxos::finish_round()
 {
+  dout(10) << __func__ << dendl;
   assert(mon->is_leader());
 
   // ok, now go active!
   state = STATE_ACTIVE;
+}
 
+void Paxos::queue_next()
+{
   dout(10) << __func__ << " state " << state
           << " proposals left " << proposals.size() << dendl;
 
@@ -1070,6 +1078,7 @@ void Paxos::finish_round()
   }
 }
 
+
 // peon
 void Paxos::handle_lease(MMonPaxos *lease)
 {
index dcba45805b0cff6cb0657e0dabc6332057fea35f..8025f06a080c1c12c787f05df75fb1ed5d5c944a 100644 (file)
@@ -1070,6 +1070,7 @@ private:
 
   void commit_proposal();
   void finish_round();
+  void queue_next();
 
 public:
   /**