From: Sage Weil Date: Tue, 26 Feb 2013 19:33:23 +0000 (-0800) Subject: mon: avoid expensive dump unless log will gather X-Git-Tag: v0.59~105 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c1cffc714ead02dd5176e68249af49ca8349e06b;p=ceph.git mon: avoid expensive dump unless log will gather Signed-off-by: Sage Weil --- diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index 8495870e9a04..72b00b85313e 100644 --- a/src/mon/PaxosService.cc +++ b/src/mon/PaxosService.cc @@ -158,11 +158,13 @@ void PaxosService::propose_pending() encode_pending(&t); have_pending = false; - JSONFormatter f(true); - t.dump(&f); - dout(30) << __func__ << " transaction dump:\n"; - f.flush(*_dout); - *_dout << dendl; + if (g_conf->subsys.should_gather(dout_subsys, 30)) { + JSONFormatter f(true); + t.dump(&f); + dout(30) << __func__ << " transaction dump:\n"; + f.flush(*_dout); + *_dout << dendl; + } t.encode(bl);