]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Paxos: set state to RECOVERING during restart
authorSage Weil <sage@inktank.com>
Tue, 19 Mar 2013 17:15:41 +0000 (10:15 -0700)
committerSage Weil <sage@inktank.com>
Tue, 19 Mar 2013 17:15:41 +0000 (10:15 -0700)
This ensures that the paxos state is not active when the PaxosService
restart() methods run right afterwards, and that EAGAIN waiters will get
requeued appropriately.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Paxos.cc

index 1a21ff37b173b89b64495842b79bf1f3f9198bf9..41214a0335d7cecef44d16a1d24f7f83ccfe1b8f 100644 (file)
@@ -1125,6 +1125,7 @@ void Paxos::restart()
   if (!proposals.empty())
     proposals.clear();
 
+  state = STATE_RECOVERING;
   going_to_bootstrap = false;
 
   finish_contexts(g_ceph_context, waiting_for_commit, -EAGAIN);