]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
paxosservice: reset propose timer when election is called
authorSage Weil <sage@newdream.net>
Fri, 12 Sep 2008 19:46:31 +0000 (12:46 -0700)
committerSage Weil <sage@newdream.net>
Fri, 12 Sep 2008 19:46:31 +0000 (12:46 -0700)
src/mon/Monitor.cc
src/mon/PaxosService.cc
src/mon/PaxosService.h

index 7142258595309755f65b790721709a279bd5bd42..2ddb9e1d3c2fb36e0aa08790023dc215e0c45b56 100644 (file)
@@ -147,6 +147,11 @@ void Monitor::call_election()
   paxos_osdmap.election_starting();
   paxos_clientmap.election_starting();
   paxos_pgmap.election_starting();
+
+  mdsmon->election_starting();
+  osdmon->election_starting();
+  clientmon->election_starting();
+  pgmon->election_starting();
   
   // call a new election
   elector.call_election();
index e609de2cc1e6dc5cc029b97d627955cb7548e2d4..21733b88639e78135eca8650b5fc320892e25d9a 100644 (file)
@@ -133,6 +133,14 @@ void PaxosService::propose_pending()
 
 
 
+void PaxosService::election_starting()
+{
+  dout(10) << "election_starting" << dendl;
+  if (proposal_timer) {
+    mon->timer.cancel_event(proposal_timer);
+    proposal_timer = 0;
+  }
+}
 
 void PaxosService::election_finished()
 {
index 7cb2bbf34ffb3353f782c38d295542dd86680c3b..10cb6fcd4e4c6e40d8a9876f6a4251461c94e5a0 100644 (file)
@@ -81,6 +81,7 @@ public:
   
   // i implement and you ignore
   void dispatch(Message *m);
+  void election_starting();
   void election_finished();
   void shutdown();