]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: reset pending_proposal after dumping to log
authorMykola Golub <mgolub@mirantis.com>
Fri, 3 Jul 2015 10:46:26 +0000 (13:46 +0300)
committerMykola Golub <mgolub@mirantis.com>
Tue, 7 Jul 2015 06:07:53 +0000 (09:07 +0300)
It fixes crashes when running with 'debug paxos = 30'.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/mon/Paxos.cc

index 715d13e2158650181d64e1e5967615a682461fe0..5863792f61dc94fac49e4d2f4ec3705e69266538 100644 (file)
@@ -1483,7 +1483,6 @@ void Paxos::propose_pending()
 
   bufferlist bl;
   pending_proposal->encode(bl);
-  pending_proposal.reset();
 
   dout(10) << __func__ << " " << (last_committed + 1)
           << " " << bl.length() << " bytes" << dendl;
@@ -1493,6 +1492,8 @@ void Paxos::propose_pending()
   f.flush(*_dout);
   *_dout << dendl;
 
+  pending_proposal.reset();
+
   committing_finishers.swap(pending_finishers);
   state = STATE_UPDATING;
   begin(bl);