From 60ed891a968e59f0f8ca184be655d63a4f9e09f2 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 5 Jun 2013 13:24:20 -0700 Subject: [PATCH] Support ephemeral cache with SQLite. --- src/cpp/ripple/Application.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cpp/ripple/Application.cpp b/src/cpp/ripple/Application.cpp index a4bc761b97..466899ad85 100644 --- a/src/cpp/ripple/Application.cpp +++ b/src/cpp/ripple/Application.cpp @@ -179,18 +179,6 @@ void Application::setup() StopSustain(); exit(3); } - - if (!theConfig.LDB_EPHEMERAL.empty()) - { - leveldb::Status status = leveldb::DB::Open(options, theConfig.LDB_EPHEMERAL, &mEphemeralLDB); - if (!status.ok() || !mEphemeralLDB) - { - WriteLog(lsFATAL, Application) << "Unable to open/create epehemeral db: " - << theConfig.LDB_EPHEMERAL << " " << status.ToString(); - StopSustain(); - exit(3); - } - } } else { @@ -199,6 +187,18 @@ void Application::setup() t5.join(); } + if (!theConfig.LDB_EPHEMERAL.empty()) + { + leveldb::Status status = leveldb::DB::Open(options, theConfig.LDB_EPHEMERAL, &mEphemeralLDB); + if (!status.ok() || !mEphemeralLDB) + { + WriteLog(lsFATAL, Application) << "Unable to open/create epehemeral db: " + << theConfig.LDB_EPHEMERAL << " " << status.ToString(); + StopSustain(); + exit(3); + } + } + mTxnDB->getDB()->setupCheckpointing(&mJobQueue); mLedgerDB->getDB()->setupCheckpointing(&mJobQueue);