]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix double propose in mdsmon tick
authorSage Weil <sage@newdream.net>
Wed, 30 Jul 2008 23:45:43 +0000 (16:45 -0700)
committerSage Weil <sage@newdream.net>
Wed, 30 Jul 2008 23:42:03 +0000 (16:42 -0700)
src/mon/MDSMonitor.cc

index c439a3ec06fcf2186dd764da213c757fea66f4a7..21449acdb8a9b387787676008d1dab141f59d9cd 100644 (file)
@@ -633,6 +633,8 @@ void MDSMonitor::tick()
 
   update_from_paxos();
   dout(10) << *this << dendl;
+  
+  bool do_propose = false;
 
   if (!mon->is_leader()) return;
 
@@ -665,7 +667,7 @@ void MDSMonitor::tick()
     // remove from standby list(s)
     pending_mdsmap.standby.erase(addr);
     pending_mdsmap.standby_any.erase(addr);
-    propose_pending();
+    do_propose = true;
   }
 
   // check beacon timestamps
@@ -736,9 +738,12 @@ void MDSMonitor::tick()
     }
 
     last_beacon.erase(addr);
+    do_propose = true;
+  }
+
+  if (do_propose)
     propose_pending();
   }
-}
 
 
 void MDSMonitor::do_stop()