mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 13:35:54 +00:00
LevelDB import speedups.
This commit is contained in:
@@ -178,6 +178,8 @@ void Application::setup()
|
||||
options.block_cache = leveldb::NewLRUCache(theConfig.getSize(siHashNodeDBCache) * 1024 * 1024);
|
||||
if (theConfig.NODE_SIZE >= 2)
|
||||
options.filter_policy = leveldb::NewBloomFilterPolicy(10);
|
||||
if (theConfig.LDB_IMPORT)
|
||||
options.write_buffer_size = 32 << 20;
|
||||
leveldb::Status status = leveldb::DB::Open(options, (theConfig.DATA_DIR / "hashnode").string(), &mHashNodeLDB);
|
||||
if (!status.ok() || !mHashNodeLDB)
|
||||
{
|
||||
|
||||
@@ -116,7 +116,7 @@ void Application::updateTables(bool ldbImport)
|
||||
if (theConfig.LDB_IMPORT)
|
||||
{
|
||||
Log(lsWARNING) << "Importing SQLite -> LevelDB";
|
||||
theApp->getHashedObjectStore().import(hashPath.string(), true);
|
||||
theApp->getHashedObjectStore().import(hashPath.string(), false);
|
||||
Log(lsWARNING) << "Remove or remname the hashnode.db file";
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user