From cd2a71d3c2a05430546127f05439beaba22c5ffa Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 31 Oct 2020 01:15:28 -0700 Subject: [PATCH] construct: Remove -checkdb flag; replace w/ -diagnostic checkdb. --- construct/construct.cc | 9 +-------- include/ircd/db/database.h | 1 - ircd/db_database.cc | 12 +----------- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/construct/construct.cc b/construct/construct.cc index 363da63a7..d1885d8b3 100644 --- a/construct/construct.cc +++ b/construct/construct.cc @@ -27,7 +27,6 @@ bool nobackfill; bool noautoapps; bool noautomod; bool nocompact; -bool checkdb; const char *recoverdb; bool nojs; bool nodirect; @@ -61,7 +60,6 @@ lgetopt opts[] { "noautoapps", &noautoapps, lgetopt::BOOL, "Disable automatic execution of managed child applications." }, { "noautomod", &noautomod, lgetopt::BOOL, "Normal execution but without autoloading modules" }, { "nocompact", &nocompact, lgetopt::BOOL, "Disable automatic database compaction" }, - { "checkdb", &checkdb, lgetopt::BOOL, "Perform complete checks of databases when opening" }, { "recoverdb", &recoverdb, lgetopt::STRING, "Specify recovery mode if DB reports corruption (try: point)" }, { "nojs", &nojs, lgetopt::BOOL, "Disable SpiderMonkey JS subsystem from initializing. (noop when not available)" }, { "nodirect", &nodirect, lgetopt::BOOL, "Disable direct IO (O_DIRECT) for unsupporting filesystems" }, @@ -550,12 +548,7 @@ applyargs() else ircd::mods::autoload.set("true"); - if(checkdb) - ircd::db::open_check.set("true"); - else - ircd::db::open_check.set("false"); - - if(recoverdb == "repair") + if(ircd::string_view(recoverdb) == "repair") { ircd::db::open_repair.set("true"); nocompact = true; diff --git a/include/ircd/db/database.h b/include/ircd/db/database.h index 903611441..6dcf38afb 100644 --- a/include/ircd/db/database.h +++ b/include/ircd/db/database.h @@ -16,7 +16,6 @@ namespace ircd::db struct database; // Broad conf items - extern conf::item open_check; extern conf::item open_recover; extern conf::item open_repair; extern conf::item open_slave; diff --git a/ircd/db_database.cc b/ircd/db_database.cc index 398db3ca9..783a6c11a 100644 --- a/ircd/db_database.cc +++ b/ircd/db_database.cc @@ -10,16 +10,6 @@ #include "db.h" -/// Conf item toggles if full database checksum verification should occur -/// when any database is opened. -decltype(ircd::db::open_check) -ircd::db::open_check -{ - { "name", "ircd.db.open.check" }, - { "default", false }, - { "persist", false }, -}; - /// Conf item determines the recovery mode to use when opening any database. /// /// "absolute" - The default and is the same for an empty value. This means @@ -1247,7 +1237,7 @@ try db::drop(*colptr); // Database integrity check branch. - if(bool(open_check)) + if(has(string_view(ircd::diagnostic), "checkdb")) { log::notice {