]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Paxos: not readable when LOCKED
authorSage Weil <sage@inktank.com>
Fri, 7 Jun 2013 18:14:58 +0000 (11:14 -0700)
committerSage Weil <sage@inktank.com>
Wed, 19 Jun 2013 18:27:05 +0000 (11:27 -0700)
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>
src/mon/Paxos.cc

index 9bd9726745ac2455bc8a69ff7fb1380b2e125cae..67df5fd373bc36224155e8c59fee378189d97816 100644 (file)
@@ -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