Support ephemeral cache with SQLite.

This commit is contained in:
JoelKatz
2013-06-05 13:24:20 -07:00
parent b7920f40b7
commit 2af49fc55a

View File

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