summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mon/Monitor.cc7
-rw-r--r--src/mon/Monitor.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index 739f9b9d182..a96122f0c36 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -3036,7 +3036,7 @@ void Monitor::send_command(const entity_inst_t& inst,
try_send_message(c, inst);
}
-void Monitor::waitlist_or_zap_client(Message *m)
+void Monitor::waitlist_or_zap_client(Message *m, bool force_zap)
{
/**
* Wait list the new session until we're in the quorum, assuming it's
@@ -3055,7 +3055,7 @@ void Monitor::waitlist_or_zap_client(Message *m)
utime_t too_old = ceph_clock_now(g_ceph_context);
too_old -= g_ceph_context->_conf->mon_lease;
if (m->get_recv_stamp() > too_old &&
- con->is_connected()) {
+ con->is_connected() && !force_zap) {
dout(5) << "waitlisting message " << *m << dendl;
maybe_wait_for_quorum.push_back(new C_RetryMessage(this, m));
} else {
@@ -3129,7 +3129,8 @@ bool Monitor::_ms_dispatch(Message *m)
dout(20) << " caps " << s->caps.get_str() << dendl;
if (is_synchronizing() && !src_is_mon) {
- waitlist_or_zap_client(m);
+ bool force_zap = (m->get_type() == MSG_MON_ELECTION);
+ waitlist_or_zap_client(m, force_zap);
return true;
}
diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h
index 1a19914ba92..03eb593185e 100644
--- a/src/mon/Monitor.h
+++ b/src/mon/Monitor.h
@@ -1332,7 +1332,7 @@ public:
void resend_routed_requests();
void remove_session(MonSession *s);
void remove_all_sessions();
- void waitlist_or_zap_client(Message *m);
+ void waitlist_or_zap_client(Message *m, bool force_zap = false);
void send_command(const entity_inst_t& inst,
const vector<string>& com, version_t version);