]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Paxos: debug ignored uncommitted values
authorSage Weil <sage@inktank.com>
Sun, 21 Jul 2013 15:12:46 +0000 (08:12 -0700)
committerSage Weil <sage@inktank.com>
Mon, 22 Jul 2013 21:13:24 +0000 (14:13 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Paxos.cc

index 7e39fce37e3fbadb55006d3951d17b5b32f52e42..bf9bb52c05c82b49cd6cf093ab98d4804e6be987 100644 (file)
@@ -391,17 +391,23 @@ void Paxos::handle_last(MMonPaxos *last)
             << num_last << " peons" << dendl;
 
     // did this person send back an accepted but uncommitted value?
-    if (last->uncommitted_pn &&
-       last->uncommitted_pn > uncommitted_pn &&
-       last->last_committed >= last_committed &&
-       last->last_committed + 1 >= uncommitted_v) {
-      uncommitted_v = last->last_committed+1;
-      uncommitted_pn = last->uncommitted_pn;
-      uncommitted_value = last->values[uncommitted_v];
-      dout(10) << "we learned an uncommitted value for " << uncommitted_v 
-              << " pn " << uncommitted_pn
-              << " " << uncommitted_value.length() << " bytes"
-              << dendl;
+    if (last->uncommitted_pn) {
+      if (last->uncommitted_pn > uncommitted_pn &&
+         last->last_committed >= last_committed &&
+         last->last_committed + 1 >= uncommitted_v) {
+       uncommitted_v = last->last_committed+1;
+       uncommitted_pn = last->uncommitted_pn;
+       uncommitted_value = last->values[uncommitted_v];
+       dout(10) << "we learned an uncommitted value for " << uncommitted_v
+                << " pn " << uncommitted_pn
+                << " " << uncommitted_value.length() << " bytes"
+                << dendl;
+      } else {
+       dout(10) << "ignoring uncommitted value for " << (last->last_committed+1)
+                << " pn " << last->uncommitted_pn
+                << " " << last->values[last->last_committed+1].length() << " bytes"
+                << dendl;
+      }
     }
     
     // is that everyone?