LevelDB import speedups.

This commit is contained in:
JoelKatz
2013-05-08 11:38:30 -07:00
parent a1132a44e8
commit dada8eb7de
2 changed files with 3 additions and 1 deletions

View File

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

View File

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