]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: do not reply to MOSDMarkMeDown if ack is not requested 1601/head
authorSage Weil <sage@inktank.com>
Thu, 3 Apr 2014 18:52:27 +0000 (11:52 -0700)
committerSage Weil <sage@inktank.com>
Fri, 2 May 2014 00:25:00 +0000 (17:25 -0700)
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 <sage@inktank.com>
src/mon/OSDMonitor.cc

index 1b1e9cb5b52a9fdfea6e4c4d8241c44e6f338fa9..30402d03fdd8dc844c19dbc5d69df4ee9ded8605 100644 (file)
@@ -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;
 }