diff --git a/cmd/kava/opendb/opendb_rocksdb.go b/cmd/kava/opendb/opendb_rocksdb.go index 35368c62..99e82043 100644 --- a/cmd/kava/opendb/opendb_rocksdb.go +++ b/cmd/kava/opendb/opendb_rocksdb.go @@ -55,6 +55,7 @@ const ( useFsyncDBOptName = "rocksdb.use_fsync" useAdaptiveMutexDBOptName = "rocksdb.use_adaptive_mutex" bytesPerSyncDBOptName = "rocksdb.bytes_per_sync" + maxBackgroundJobsDBOptName = "rocksdb.max-background-jobs" writeBufferSizeCFOptName = "rocksdb.write-buffer-size" numLevelsCFOptName = "rocksdb.num-levels" @@ -173,6 +174,11 @@ func overrideDBOpts(dbOpts *grocksdb.Options, appOpts types.AppOptions) *grocksd dbOpts.SetBytesPerSync(cast.ToUint64(bytesPerSync)) } + maxBackgroundJobs := appOpts.Get(maxBackgroundJobsDBOptName) + if maxBackgroundJobs != nil { + dbOpts.SetMaxBackgroundJobs(cast.ToInt(maxBackgroundJobs)) + } + return dbOpts }