summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-22 14:13:23 -0700
committerSage Weil <sage@inktank.com>2013-07-24 09:01:20 -0700
commit732286a28cd8a643593d490a7a84a590d372f78d (patch)
tree3a1e58e27ad2114e6fa888e45a17bcc04aba2caa
parent59ddece17e36fef69ecf40e239aeffad33c9db35 (diff)
downloadceph-732286a28cd8a643593d490a7a84a590d372f78d.tar.gz
mon/Paxos: only share uncommitted value if it is next
We may have an uncommitted value from our perspective (it is our lc + 1) when the collector has a much larger lc (because we have been out for the last few rounds). Only share an uncommitted value if it is in fact the next value. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit b26b7f6e5e02ac6beb66e3e34e177e6448cf91cf)
-rw-r--r--src/mon/Paxos.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc
index 01e06209872..b52986cf401 100644
--- a/src/mon/Paxos.cc
+++ b/src/mon/Paxos.cc
@@ -205,7 +205,8 @@ void Paxos::handle_collect(MMonPaxos *collect)
// do we have an accepted but uncommitted value?
// (it'll be at last_committed+1)
bufferlist bl;
- if (get_store()->exists(get_name(), last_committed+1)) {
+ if (collect->last_committed == last_committed &&
+ get_store()->exists(get_name(), last_committed+1)) {
get_store()->get(get_name(), last_committed+1, bl);
assert(bl.length() > 0);
dout(10) << " sharing our accepted but uncommitted value for "