mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd::net/db: Hard debug log quiet for now; minor cleanup.
This commit is contained in:
parent
87c6f91530
commit
5b61e1d01f
2 changed files with 12 additions and 7 deletions
13
ircd/db.cc
13
ircd/db.cc
|
@ -2358,7 +2358,7 @@ ircd::db::seek(row &r,
|
||||||
|
|
||||||
const column &c(r[0]);
|
const column &c(r[0]);
|
||||||
const database &d(c);
|
const database &d(c);
|
||||||
const ircd::timer timer;
|
// const ircd::timer timer;
|
||||||
const auto ret
|
const auto ret
|
||||||
{
|
{
|
||||||
std::count_if(begin(r), end(r), [&p]
|
std::count_if(begin(r), end(r), [&p]
|
||||||
|
@ -2367,7 +2367,7 @@ ircd::db::seek(row &r,
|
||||||
return seek(cell, p);
|
return seek(cell, p);
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
/*
|
||||||
log.debug("'%s' %lu:%lu '%s' row SEEK %zu of %zu in %ld$us",
|
log.debug("'%s' %lu:%lu '%s' row SEEK %zu of %zu in %ld$us",
|
||||||
name(d),
|
name(d),
|
||||||
sequence(d),
|
sequence(d),
|
||||||
|
@ -2376,7 +2376,7 @@ ircd::db::seek(row &r,
|
||||||
ret,
|
ret,
|
||||||
r.size(),
|
r.size(),
|
||||||
timer.at<microseconds>().count());
|
timer.at<microseconds>().count());
|
||||||
|
*/
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
template size_t ircd::db::seek<ircd::db::pos>(row &, const pos &);
|
template size_t ircd::db::seek<ircd::db::pos>(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),
|
name(d),
|
||||||
sequence(d),
|
sequence(d),
|
||||||
sequence(opts.snapshot),
|
sequence(opts.snapshot),
|
||||||
name(c),
|
name(c),
|
||||||
key.size(),
|
key.size(),
|
||||||
status.ok()? "YES"s : "NO"s,
|
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
|
// Finally the result
|
||||||
switch(status.code())
|
switch(status.code())
|
||||||
|
@ -3431,6 +3431,7 @@ ircd::db::_seek(database::column &c,
|
||||||
// Branch for query being fulfilled from cache
|
// Branch for query being fulfilled from cache
|
||||||
if(!it->status().IsIncomplete())
|
if(!it->status().IsIncomplete())
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
log.debug("'%s' %lu:%lu SEEK[%s] %s %s -> %s in %ld$us '%s'",
|
log.debug("'%s' %lu:%lu SEEK[%s] %s %s -> %s in %ld$us '%s'",
|
||||||
name(d),
|
name(d),
|
||||||
sequence(d),
|
sequence(d),
|
||||||
|
@ -3441,7 +3442,7 @@ ircd::db::_seek(database::column &c,
|
||||||
valid(*it)? "VALID" : "INVALID",
|
valid(*it)? "VALID" : "INVALID",
|
||||||
timer.at<microseconds>().count(),
|
timer.at<microseconds>().count(),
|
||||||
name(c));
|
name(c));
|
||||||
|
*/
|
||||||
return valid(*it);
|
return valid(*it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1170,11 +1170,15 @@ ircd::net::socket::handle(const std::weak_ptr<socket> wp,
|
||||||
const size_t &bytes)
|
const size_t &bytes)
|
||||||
noexcept try
|
noexcept try
|
||||||
{
|
{
|
||||||
|
// After life_guard is constructed it is safe to use *this in this frame.
|
||||||
const life_guard<socket> s{wp};
|
const life_guard<socket> s{wp};
|
||||||
log.debug("socket(%p): %zu bytes: %s: %s",
|
|
||||||
|
/*
|
||||||
|
log.debug("socket(%p): %zu bytes; %s: %s",
|
||||||
this,
|
this,
|
||||||
bytes,
|
bytes,
|
||||||
string(ec));
|
string(ec));
|
||||||
|
*/
|
||||||
|
|
||||||
// This handler and the timeout handler are responsible for canceling each other
|
// 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
|
// when one or the other is entered. If the timeout handler has already fired for
|
||||||
|
|
Loading…
Reference in a new issue