]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: do not return no_reply() again
authorKefu Chai <kchai@redhat.com>
Thu, 11 Mar 2021 09:45:49 +0000 (17:45 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 19 Mar 2021 16:04:32 +0000 (00:04 +0800)
we always return "no_op" message to proxy monitor in
`OSDMonitor::prepare_failure()` at the very beginning of this method. so
no need to reply the peon again when discarding the failure report.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/OSDMonitor.cc

index d1c415ae24d5becb4d1ff4d4622d45d4c39c15b4..ac355718753fe4249ca72e0052db6123d1fab8e9 100644 (file)
@@ -3334,11 +3334,7 @@ bool OSDMonitor::prepare_failure(MonOpRequestRef op)
                      << m->get_orig_source();
 
     failure_info_t& fi = failure_info[target_osd];
-    MonOpRequestRef old_op = fi.add_report(reporter, failed_since, op);
-    if (old_op) {
-      mon.no_reply(old_op);
-    }
-
+    fi.add_report(reporter, failed_since, op);
     return check_failure(now, target_osd, fi);
   } else {
     // remove the report
@@ -3347,10 +3343,7 @@ bool OSDMonitor::prepare_failure(MonOpRequestRef op)
                       << m->get_orig_source();
     if (failure_info.count(target_osd)) {
       failure_info_t& fi = failure_info[target_osd];
-      MonOpRequestRef report_op = fi.cancel_report(reporter);
-      if (report_op) {
-        mon.no_reply(report_op);
-      }
+      fi.cancel_report(reporter);
       if (fi.reporters.empty()) {
        dout(10) << " removing last failure_info for osd." << target_osd
                 << dendl;