]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
paxos: fix is_consistent() check
authorSage Weil <sage@newdream.net>
Fri, 17 Feb 2012 18:23:12 +0000 (10:23 -0800)
committerSage Weil <sage@newdream.net>
Fri, 17 Feb 2012 18:23:12 +0000 (10:23 -0800)
If our last_committed == 1, we don't need a separate stash.  This is the
logic that slurp() follows, so fix is_consistent() to match.

Fixes: #2077
Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/Paxos.cc

index 94064e3baaa6a8c1f32ac56bf7d101043b386f55..66c720af533ddd1c050702130f8500be42f0b2db 100644 (file)
@@ -1069,7 +1069,7 @@ version_t Paxos::get_stashed(bufferlist& bl)
 bool Paxos::is_consistent()
 {
   bool consistent = true;
-  if (first_committed > latest_stashed)
+  if (first_committed > 1 && first_committed > latest_stashed)
     consistent = false;
   if (first_committed > last_committed)
     consistent = false;