]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PaxosService: do not prepare new pending if still proposing
authorSage Weil <sage@inktank.com>
Fri, 12 Jul 2013 20:50:49 +0000 (13:50 -0700)
committerSage Weil <sage@inktank.com>
Sat, 13 Jul 2013 20:00:06 +0000 (13:00 -0700)
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 <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/mon/PaxosService.cc

index e20322a4a6b5b54636122d160d0612885f0f60d3..efe60aafd691a9894df441c87d8ffb8cb902ad22 100644 (file)
@@ -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));