From a502848386e9581298d3d1843ceeaa761b6447c5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 30 Jul 2008 16:45:43 -0700 Subject: [PATCH] mon: fix double propose in mdsmon tick --- src/mon/MDSMonitor.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 9e014b79831e8..bb758e47897a2 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -632,6 +632,8 @@ void MDSMonitor::tick() update_from_paxos(); dout(10) << *this << dendl; + + bool do_propose = false; // expand mds cluster? int cursize = pending_mdsmap.get_num_in_mds() + @@ -662,7 +664,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 @@ -733,9 +735,12 @@ void MDSMonitor::tick() } last_beacon.erase(addr); + do_propose = true; + } + + if (do_propose) propose_pending(); } -} void MDSMonitor::do_stop() -- 2.39.5