diff options
author | Sage Weil <sage@inktank.com> | 2013-06-20 15:39:23 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-06-24 16:16:42 -0700 |
commit | e1ac7c6c3ca673d08710829aa5a3c03735710486 (patch) | |
tree | 036bf0b057818ab61f76dc33a104a290a0ad919a | |
parent | 02b0b4a9acb439b2ee5deadc8b02492006492931 (diff) | |
download | ceph-e1ac7c6c3ca673d08710829aa5a3c03735710486.tar.gz |
mon/PaxosService: allow paxos service writes while paxos is updating
In commit f985de28f86675e974ac7842a49922a35fe24c6c I mistakenly made
is_writeable() false while paxos was updating due to a misread of
Paxos::propose_new_value() (I didn't see that it would queue).
This is problematic because it narrows the window during which each service
is writeable for no reason.
Allow service to be writeable both when paxos is active and updating.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 11169693d086e67dcf168ce65ef6e13eebd1a1ab)
-rw-r--r-- | src/mon/PaxosService.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mon/PaxosService.h b/src/mon/PaxosService.h index 63e06110d07..100ec4f52fd 100644 --- a/src/mon/PaxosService.h +++ b/src/mon/PaxosService.h @@ -547,7 +547,7 @@ public: * * - we are not proposing a new version; * - we are ready to be written to -- i.e., we have a pending value. - * - paxos is writeable + * - paxos is (active or updating) * * @returns true if writeable; false otherwise */ @@ -555,7 +555,7 @@ public: return !is_proposing() && is_write_ready() && - paxos->is_writeable(); + (paxos->is_active() || paxos->is_updating()); } /** |