mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 06:53:58 +01:00
ircd::db::database::env: Replace RB_DEBUG_DB_ENV w/ if constexpr.
This commit is contained in:
parent
57dbd72c82
commit
c2ee855346
3 changed files with 783 additions and 872 deletions
10
ircd/db.h
10
ircd/db.h
|
@ -10,12 +10,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
/// Uncomment or -D this #define to enable extensive log messages covering the
|
||||
/// entire RocksDB callback surface. This is only useful for developers
|
||||
/// specifically working on the backend of the DB and no real use for
|
||||
/// developers making frontend queries to it. Massively verbose.
|
||||
/// Enable extensive log messages covering the entire RocksDB callback surface.
|
||||
/// This is only useful for developers specifically working on the backend of
|
||||
/// the DB and no real use for developers making frontend queries to it.
|
||||
/// Massively verbose.
|
||||
///
|
||||
//#define RB_DEBUG_DB_ENV
|
||||
#define RB_DEBUG_DB_ENV 0
|
||||
|
||||
/// This #define is more useful to developers making queries to the database.
|
||||
/// It is still so verbose that it goes beyond what is tolerable and generally
|
||||
|
|
|
@ -3339,7 +3339,6 @@ const noexcept
|
|||
{
|
||||
const ctx::uninterruptible::nothrow ui;
|
||||
|
||||
#ifdef RB_DEBUG_DB_ENV
|
||||
const auto typestr
|
||||
{
|
||||
type == kValue?
|
||||
|
@ -3348,7 +3347,6 @@ const noexcept
|
|||
"MERGE"_sv:
|
||||
"BLOB"_sv
|
||||
};
|
||||
#endif
|
||||
|
||||
static const compactor::callback empty;
|
||||
const db::compactor::callback &callback
|
||||
|
@ -3365,7 +3363,7 @@ const noexcept
|
|||
if(!callback)
|
||||
return Decision::kKeep;
|
||||
|
||||
#ifdef RB_DEBUG_DB_ENV
|
||||
if constexpr(RB_DEBUG_DB_ENV)
|
||||
log::debug
|
||||
{
|
||||
log, "[%s]'%s': compaction level:%d key:%zu@%p type:%s old:%zu@%p new:%p skip:%p",
|
||||
|
@ -3380,7 +3378,6 @@ const noexcept
|
|||
(const void *)newval,
|
||||
(const void *)skip
|
||||
};
|
||||
#endif
|
||||
|
||||
const compactor::args args
|
||||
{
|
||||
|
@ -3538,7 +3535,7 @@ ircd::db::database::rate_limiter::RequestToken(size_t bytes,
|
|||
OpType type)
|
||||
noexcept
|
||||
{
|
||||
#ifdef RB_DEBUG_DB_ENV
|
||||
if constexpr(RB_DEBUG_DB_ENV)
|
||||
log::debug
|
||||
{
|
||||
log, "[%s] Rate Limiter request bytes:%zu alignment:%zu prio:%s type:%s",
|
||||
|
@ -3552,7 +3549,6 @@ noexcept
|
|||
"READ"_sv:
|
||||
"????"_sv,
|
||||
};
|
||||
#endif
|
||||
|
||||
assert(prio <= IOPriority::IO_TOTAL);
|
||||
{
|
||||
|
|
255
ircd/db_env.cc
255
ircd/db_env.cc
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue