]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not bother with misdirected op diagnosis by default
authorSage Weil <sage@redhat.com>
Thu, 25 May 2017 19:31:33 +0000 (15:31 -0400)
committerSage Weil <sage@redhat.com>
Fri, 26 May 2017 02:29:22 +0000 (22:29 -0400)
We enable osd_debug_misdirected_ops in QA, but this is wasted effort on
a production cluster.  In particular, it means that a idle client that
sends an op to the wrong OSD based on an old map will require that OSD to
load that old map into memory to decide whether to print a warning... all
on the off-chance that the client is buggy.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index 413e15da1c704ed3755fd294fb0d323330f0914c..7913c41055d5d96c9fcd16156def7871363286f6 100644 (file)
@@ -1528,6 +1528,10 @@ void OSDService::reply_op_error(OpRequestRef op, int err, eversion_t v,
 
 void OSDService::handle_misdirected_op(PG *pg, OpRequestRef op)
 {
+  if (!cct->_conf->osd_debug_misdirected_ops) {
+    return;
+  }
+
   const MOSDOp *m = static_cast<const MOSDOp*>(op->get_req());
   assert(m->get_type() == CEPH_MSG_OSD_OP);