From fe4ac3b77dfc3f3176706dfb54cd143637d93720 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 c439a3ec06fcf..21449acdb8a9b 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -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() -- 2.39.5