If RocksDB high threads are configured, use them for flushes

This commit is contained in:
David Schwartz
2014-04-22 16:00:10 -07:00
committed by Vinnie Falco
parent 6f6720b346
commit 3dde8b4345

View File

@@ -143,8 +143,13 @@ public:
if (! keyValues["high_threads"].isEmpty())
{
options.env->SetBackgroundThreads
(keyValues["high_threads"].getIntValue(), rocksdb::Env::HIGH);
auto const highThreads = keyValues["high_threads"].getIntValue();
options.env->SetBackgroundThreads (highThreads, rocksdb::Env::HIGH);
// If we have high-priority threads, presumably we want to
// use them for background flushes
if (highThreads > 0)
options.max_background_flushes = highThreads;
}
rocksdb::DB* db = nullptr;