From 5b61e1d01f436d132616976fc51579999c7d027c Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 15 Nov 2017 17:31:42 -0800 Subject: [PATCH] ircd::net/db: Hard debug log quiet for now; minor cleanup. --- ircd/db.cc | 13 +++++++------ ircd/net.cc | 6 +++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ircd/db.cc b/ircd/db.cc index 65c250a6d..43056012e 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -2358,7 +2358,7 @@ ircd::db::seek(row &r, const column &c(r[0]); const database &d(c); - const ircd::timer timer; +// const ircd::timer timer; const auto ret { std::count_if(begin(r), end(r), [&p] @@ -2367,7 +2367,7 @@ ircd::db::seek(row &r, return seek(cell, p); }) }; - +/* log.debug("'%s' %lu:%lu '%s' row SEEK %zu of %zu in %ld$us", name(d), sequence(d), @@ -2376,7 +2376,7 @@ ircd::db::seek(row &r, ret, r.size(), timer.at().count()); - +*/ return ret; } template size_t ircd::db::seek(row &, const pos &); @@ -2753,14 +2753,14 @@ ircd::db::has(column &column, }); } - log.debug("'%s' %lu:%lu '%s' HAS key(%zu B) %s [%s]", + log.debug("'%s' %lu:%lu '%s' HAS key(%zu B) %s%s", name(d), sequence(d), sequence(opts.snapshot), name(c), key.size(), status.ok()? "YES"s : "NO"s, - opts.read_tier == BLOCKING? "CACHE MISS"s : "CACHE HIT"s); + opts.read_tier == BLOCKING? " CACHE MISS"s : ""s); // Finally the result switch(status.code()) @@ -3431,6 +3431,7 @@ ircd::db::_seek(database::column &c, // Branch for query being fulfilled from cache if(!it->status().IsIncomplete()) { +/* log.debug("'%s' %lu:%lu SEEK[%s] %s %s -> %s in %ld$us '%s'", name(d), sequence(d), @@ -3441,7 +3442,7 @@ ircd::db::_seek(database::column &c, valid(*it)? "VALID" : "INVALID", timer.at().count(), name(c)); - +*/ return valid(*it); } diff --git a/ircd/net.cc b/ircd/net.cc index 0a22719ff..837f36946 100644 --- a/ircd/net.cc +++ b/ircd/net.cc @@ -1170,11 +1170,15 @@ ircd::net::socket::handle(const std::weak_ptr wp, const size_t &bytes) noexcept try { + // After life_guard is constructed it is safe to use *this in this frame. const life_guard s{wp}; - log.debug("socket(%p): %zu bytes: %s: %s", + +/* + log.debug("socket(%p): %zu bytes; %s: %s", this, bytes, string(ec)); +*/ // This handler and the timeout handler are responsible for canceling each other // when one or the other is entered. If the timeout handler has already fired for