From: Sage Weil Date: Fri, 7 Jun 2013 18:14:58 +0000 (-0700) Subject: mon/Paxos: not readable when LOCKED X-Git-Tag: v0.66~47^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec2ea86ed55e00265c2cc5ad0c94460b4c92865c;p=ceph.git 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 --- 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