diff options
author | Joao Eduardo Luis <joao.luis@inktank.com> | 2013-04-15 13:38:04 +0100 |
---|---|---|
committer | Joao Eduardo Luis <joao.luis@inktank.com> | 2013-04-22 15:14:28 +0100 |
commit | 291a86ed9082bf1469e84a45374b2b86f3578f21 (patch) | |
tree | 3bf9d2b56ebe65550d4bf7af07771e1862b02557 | |
parent | 1a8b30eff1c7336607872eb41113539ff8817a01 (diff) | |
download | ceph-291a86ed9082bf1469e84a45374b2b86f3578f21.tar.gz |
mon: PaxosService: consider is_recovering() on is_writeable()
A service is never writeable while it's recovering.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
-rw-r--r-- | src/mon/PaxosService.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mon/PaxosService.h b/src/mon/PaxosService.h index f16bc77cdeb..31ec1eea999 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()); } /** |