diff --git a/src/pika_conf.cc b/src/pika_conf.cc index b00ce94c93..5b097aab96 100644 --- a/src/pika_conf.cc +++ b/src/pika_conf.cc @@ -366,8 +366,8 @@ int PikaConf::Load() { if (max_background_flushes_ <= 0) { max_background_flushes_ = 1; } - if (max_background_flushes_ >= 4) { - max_background_flushes_ = 4; + if (max_background_flushes_ >= 6) { + max_background_flushes_ = 6; } max_background_compactions_ = 2; @@ -379,13 +379,13 @@ int PikaConf::Load() { max_background_compactions_ = 8; } - max_background_jobs_ = (1 + 2); + max_background_jobs_ = max_background_flushes_ + max_background_compactions_; GetConfInt("max-background-jobs", &max_background_jobs_); if (max_background_jobs_ <= 0) { max_background_jobs_ = (1 + 2); } - if (max_background_jobs_ >= (8 + 4)) { - max_background_jobs_ = (8 + 4); + if (max_background_jobs_ >= (8 + 6)) { + max_background_jobs_ = (8 + 6); } max_cache_files_ = 5000; diff --git a/src/storage/src/storage.cc b/src/storage/src/storage.cc index 94427afb42..9fb252a7d0 100644 --- a/src/storage/src/storage.cc +++ b/src/storage/src/storage.cc @@ -2269,7 +2269,7 @@ Status Storage::GetUsage(const std::string& property, uint64_t* const result) { Status Storage::GetUsage(const std::string& property, std::map* const inst_result) { inst_result->clear(); for (const auto& inst : insts_) { - uint64_t value; + uint64_t value = 0; inst->GetProperty(property, &value); (*inst_result)[inst->GetIndex()] = value; }