summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mon/Paxos.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc
index adb497b9d49..fa3e2089842 100644
--- a/src/mon/Paxos.cc
+++ b/src/mon/Paxos.cc
@@ -384,6 +384,8 @@ void Paxos::_sanity_check_store()
// leader
void Paxos::handle_last(MMonPaxos *last)
{
+ bool need_refresh = false;
+
dout(10) << "handle_last " << *last << dendl;
if (!mon->is_leader()) {
@@ -410,7 +412,7 @@ void Paxos::handle_last(MMonPaxos *last)
assert(g_conf->paxos_kill_at != 1);
// store any committed values if any are specified in the message
- store_state(last);
+ need_refresh = store_state(last);
assert(g_conf->paxos_kill_at != 2);
@@ -486,6 +488,7 @@ void Paxos::handle_last(MMonPaxos *last)
dout(10) << "that's everyone. active!" << dendl;
extend_lease();
+ need_refresh = false;
if (do_refresh()) {
finish_round();
@@ -500,6 +503,9 @@ void Paxos::handle_last(MMonPaxos *last)
dout(10) << "old pn, ignoring" << dendl;
}
+ if (need_refresh)
+ do_refresh();
+
last->put();
}