summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-06-07 11:14:58 -0700
committerSage Weil <sage@inktank.com>2013-06-24 16:16:41 -0700
commitc43b1f4dff254df96144b0b4d569cc72421a8fff (patch)
treeac9c64f41d03621811c650447940e32492c53925
parent10d41200622d76dbf276602828584e7153cb22b5 (diff)
downloadceph-c43b1f4dff254df96144b0b4d569cc72421a8fff.tar.gz
mon/Paxos: not readable when LOCKED
If we are re-proposing a previously accepted value from a previous quorum, we should not consider it readable, because it is possible it was exposed to clients as committed (2/3 accepted) but not recored to be committed, and we do not want to expose old state as readable when new state was previously readable. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit ec2ea86ed55e00265c2cc5ad0c94460b4c92865c)
-rw-r--r--src/mon/Paxos.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc
index 7ce5f687066..5ff6acb1ab7 100644
--- a/src/mon/Paxos.cc
+++ b/src/mon/Paxos.cc
@@ -1200,6 +1200,7 @@ bool Paxos::is_readable(version_t v)
return
(mon->is_peon() || mon->is_leader()) &&
(is_active() || is_updating()) &&
+ !is_locked() &&
last_committed > 0 && // must have a value
(mon->get_quorum().size() == 1 || // alone, or
is_lease_valid()); // have lease