From db41bdda7e02aedc42d14be635b19075b112baf0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 17 Feb 2012 10:23:12 -0800 Subject: [PATCH] paxos: fix is_consistent() check 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 --- src/mon/Paxos.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 94064e3baaa6a..66c720af533dd 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -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; -- 2.39.5