mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
If RocksDB high threads are configured, use them for flushes
This commit is contained in:
committed by
Vinnie Falco
parent
6f6720b346
commit
3dde8b4345
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user