mon: reset pending_proposal after dumping to log

It fixes crashes when running with 'debug paxos = 30'.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
Mykola Golub 2015-07-03 13:46:26 +03:00
parent 03f3fc4aba
commit 60ff33740d

View 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);