From 60ff33740d10bc16511c6e1bf0dee67ceac52e88 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Fri, 3 Jul 2015 13:46:26 +0300 Subject: [PATCH] mon: reset pending_proposal after dumping to log It fixes crashes when running with 'debug paxos = 30'. Signed-off-by: Mykola Golub --- src/mon/Paxos.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 715d13e2158..5863792f61d 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -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);