0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

construct: Remove -checkdb flag; replace w/ -diagnostic checkdb.

This commit is contained in:
Jason Volk 2020-10-31 01:15:28 -07:00
parent b8c68f133c
commit cd2a71d3c2
3 changed files with 2 additions and 20 deletions

View file

@ -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;

View file

@ -16,7 +16,6 @@ namespace ircd::db
struct database;
// Broad conf items
extern conf::item<bool> open_check;
extern conf::item<std::string> open_recover;
extern conf::item<bool> open_repair;
extern conf::item<bool> open_slave;

View file

@ -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
{