From f06580906acead8430fe02a8368cd18a220d3e3a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 3 Apr 2014 11:52:27 -0700 Subject: [PATCH] mon/OSDMonitor: do not reply to MOSDMarkMeDown if ack is not requested If a reply isn't requested, do not bother to send one. Note that old clients did not request an ack, but we will infer that they do from the message encoding (see previous commit). Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 1b1e9cb5b52..30402d03fdd 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -903,8 +903,10 @@ bool OSDMonitor::preprocess_mark_me_down(MOSDMarkMeDown *m) return false; reply: - Context *c(new C_AckMarkedDown(this, m)); - c->complete(0); + if (m->request_ack) { + Context *c(new C_AckMarkedDown(this, m)); + c->complete(0); + } return true; } @@ -917,7 +919,8 @@ bool OSDMonitor::prepare_mark_me_down(MOSDMarkMeDown *m) mon->clog.info() << "osd." << target_osd << " marked itself down\n"; pending_inc.new_state[target_osd] = CEPH_OSD_UP; - wait_for_finished_proposal(new C_AckMarkedDown(this, m)); + if (m->request_ack) + wait_for_finished_proposal(new C_AckMarkedDown(this, m)); return true; } -- 2.47.3