From d4876c533ccdddddba8d5097e8e19e4ff079da1b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 12 Jul 2013 13:50:49 -0700 Subject: [PATCH] mon/PaxosService: do not prepare new pending if still proposing The _active callback can get called while are already proposing. If that happens, we should not prepare a fresh new pending but should wait for the previous proposal to finish. Signed-off-by: Sage Weil Reviewed-by: Greg Farnum --- src/mon/PaxosService.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index e20322a4a6b5b..efe60aafd691a 100644 --- a/src/mon/PaxosService.cc +++ b/src/mon/PaxosService.cc @@ -259,6 +259,10 @@ void PaxosService::election_finished() void PaxosService::_active() { + if (is_proposing()) { + dout(10) << "_acting - proposing" << dendl; + return; + } if (!is_active()) { dout(10) << "_active - not active" << dendl; wait_for_active(new C_Active(this)); -- 2.39.5