0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +01:00

construct: Allow -recoverdb option to specify a string argument.

This commit is contained in:
Jason Volk 2020-10-27 22:07:41 -07:00
parent 975c54a1a3
commit 9fd7b60917

View file

@ -29,7 +29,7 @@ bool noautomod;
bool nocompact; bool nocompact;
bool checkdb; bool checkdb;
bool pitrecdb; bool pitrecdb;
bool recoverdb; const char *recoverdb;
bool repairdb; bool repairdb;
bool nojs; bool nojs;
bool nodirect; bool nodirect;
@ -65,8 +65,7 @@ lgetopt opts[]
{ "nocompact", &nocompact, lgetopt::BOOL, "Disable automatic database compaction" }, { "nocompact", &nocompact, lgetopt::BOOL, "Disable automatic database compaction" },
{ "checkdb", &checkdb, lgetopt::BOOL, "Perform complete checks of databases when opening" }, { "checkdb", &checkdb, lgetopt::BOOL, "Perform complete checks of databases when opening" },
{ "pitrecdb", &pitrecdb, lgetopt::BOOL, "Allow Point-In-Time-Recover if DB reports corruption after crash" }, { "pitrecdb", &pitrecdb, lgetopt::BOOL, "Allow Point-In-Time-Recover if DB reports corruption after crash" },
{ "recoverdb", &recoverdb, lgetopt::BOOL, "Allow earlier Point-In-Time when -pitrecdb does not work" }, { "recoverdb", &recoverdb, lgetopt::STRING, "Specify a more aggressive recovery mode if -pitrecdb does not work" },
{ "repairdb", &repairdb, lgetopt::BOOL, "Perform full DB repair after deep block/file corruption" },
{ "nojs", &nojs, lgetopt::BOOL, "Disable SpiderMonkey JS subsystem from initializing. (noop when not available)" }, { "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" }, { "nodirect", &nodirect, lgetopt::BOOL, "Disable direct IO (O_DIRECT) for unsupporting filesystems" },
{ "noaio", &noaio, lgetopt::BOOL, "Disable the AIO interface in favor of traditional syscalls. " }, { "noaio", &noaio, lgetopt::BOOL, "Disable the AIO interface in favor of traditional syscalls. " },
@ -565,7 +564,7 @@ applyargs()
ircd::db::open_recover.set("absolute"); ircd::db::open_recover.set("absolute");
if(recoverdb) if(recoverdb)
ircd::db::open_recover.set("recover"); ircd::db::open_recover.set(recoverdb);
if(repairdb) if(repairdb)
{ {