]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
paxos: only store committed values in store_state
authorSage Weil <sage@newdream.net>
Fri, 28 May 2010 19:48:41 +0000 (12:48 -0700)
committerSage Weil <sage@newdream.net>
Fri, 28 May 2010 19:48:41 +0000 (12:48 -0700)
The uncommitted value is handled specially by handle_last()

src/mon/Paxos.cc

index a432ead9b8cff23ce10b68e83a045044504920b7..346e2f456e2bd45e29f05d0a996bf6f8a3c45228 100644 (file)
@@ -206,7 +206,7 @@ void Paxos::store_state(MMonPaxos *m)
   }
 
   for (map<version_t,bufferlist>::iterator p = m->values.begin();
-       p != m->values.end();
+       p->first <= m->last_committed;
        ++p) {
     if (p->first <= last_committed)
       continue;