]> 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)
committerNeha Ojha <nojha@redhat.com>
Thu, 29 Apr 2021 17:40:50 +0000 (17:40 +0000)
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>
(cherry picked from commit 062a3859b989069b2120678db1787cb077e51bd3)

src/mon/OSDMonitor.cc

index c4707101b69fa3a4ead156a8cff9d18da82f0875..ff3f9d0b5e65ece685a2a079b39e1eccecac1769 100644 (file)
@@ -3337,11 +3337,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
@@ -3350,10 +3346,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;