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-17 14:24:45 -0700
commit658bb5dbcae0e499d0f9f426303a6301e64c9856 (patch)
treee699ea8a8c140e0b1b7a814a317b050e8f0f282a
parent98b5b8e075c1314bd4c4da7ea8b8ce46485f5e88 (diff)
downloadceph-658bb5dbcae0e499d0f9f426303a6301e64c9856.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>
-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 9bd9726745a..67df5fd373b 100644
--- a/src/mon/Paxos.cc
+++ b/src/mon/Paxos.cc
@@ -1198,6 +1198,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