mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve online_delete configuration and DB tuning:
* Document delete_batch, back_off_milliseconds, age_threshold_seconds. * Convert those time values to chrono types. * Fix bug that ignored age_threshold_seconds. * Add a "recovery buffer" to the config that gives the node a chance to recover before aborting online delete. * Add begin/end log messages around the SQL queries. * Add a new configuration section: [sqlite] to allow tuning the sqlite database operations. Ignored on full/large history servers. * Update documentation of [node_db] and [sqlite] in the rippled-example.cfg file. Resolves #3321
This commit is contained in:
committed by
Nik Bougalis
parent
00702f28c2
commit
4702c8b591
@@ -59,12 +59,22 @@ namespace jtx {
|
||||
Env::AppBundle::AppBundle(
|
||||
beast::unit_test::suite& suite,
|
||||
std::unique_ptr<Config> config,
|
||||
std::unique_ptr<Logs> logs)
|
||||
std::unique_ptr<Logs> logs,
|
||||
beast::severities::Severity thresh)
|
||||
: AppBundle()
|
||||
{
|
||||
using namespace beast::severities;
|
||||
// Use kFatal threshold to reduce noise from STObject.
|
||||
setDebugLogSink(std::make_unique<SuiteJournalSink>("Debug", kFatal, suite));
|
||||
if (logs)
|
||||
{
|
||||
setDebugLogSink(logs->makeSink("Debug", kFatal));
|
||||
}
|
||||
else
|
||||
{
|
||||
logs = std::make_unique<SuiteLogs>(suite);
|
||||
// Use kFatal threshold to reduce noise from STObject.
|
||||
setDebugLogSink(
|
||||
std::make_unique<SuiteJournalSink>("Debug", kFatal, suite));
|
||||
}
|
||||
auto timeKeeper_ = std::make_unique<ManualTimeKeeper>();
|
||||
timeKeeper = timeKeeper_.get();
|
||||
// Hack so we don't have to call Config::setup
|
||||
@@ -72,7 +82,7 @@ Env::AppBundle::AppBundle(
|
||||
owned = make_Application(
|
||||
std::move(config), std::move(logs), std::move(timeKeeper_));
|
||||
app = owned.get();
|
||||
app->logs().threshold(kError);
|
||||
app->logs().threshold(thresh);
|
||||
if (!app->setup())
|
||||
Throw<std::runtime_error>("Env::AppBundle: setup failed");
|
||||
timeKeeper->set(app->getLedgerMaster().getClosedLedger()->info().closeTime);
|
||||
|
||||
Reference in New Issue
Block a user