From: Joao Eduardo Luis Date: Mon, 15 Apr 2013 12:38:04 +0000 (+0100) Subject: mon: PaxosService: consider is_recovering() on is_writeable() X-Git-Tag: v0.61~117^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b29a5b151f83cbc3419db37eca0fd50d14282ba8;p=ceph.git mon: PaxosService: consider is_recovering() on is_writeable() A service is never writeable while it's recovering. Signed-off-by: Joao Eduardo Luis --- diff --git a/src/mon/PaxosService.h b/src/mon/PaxosService.h index f16bc77cdeb1..31ec1eea9994 100644 --- a/src/mon/PaxosService.h +++ b/src/mon/PaxosService.h @@ -502,13 +502,15 @@ public: * - our monitor is the leader; * - we have a valid lease; * - Paxos is not boostrapping. + * - Paxos is not recovering. * * @returns true if writeable; false otherwise */ bool is_writeable() { return (!is_proposing() && mon->is_leader() && !paxos->is_locked() - && paxos->is_lease_valid() && !paxos->is_bootstrapping()); + && paxos->is_lease_valid() && !paxos->is_bootstrapping() + && !paxos->is_recovering()); } /**