ShooterIT commented on code in PR #497: URL: https://github.com/apache/incubator-kvrocks/pull/497#discussion_r860767561
########## src/config.cc: ########## @@ -404,6 +414,31 @@ void Config::initFieldCallback() { double cutoff = val / 100; return srv->storage_->SetColumnFamilyOption(trimRocksDBPrefix(k), std::to_string(cutoff)); }}, + {"rocksdb.max_bytes_for_level_base", [this](Server* srv, const std::string &k, const std::string& v)->Status { + if (!srv) return Status::OK(); + if (!RocksDB.level_compaction_dynamic_level_bytes) { + return Status(Status::NotOK, errNotSetLevelCompactionDynamicLevelBytes); + } + return srv->storage_->SetColumnFamilyOption(trimRocksDBPrefix(k), + std::to_string(RocksDB.max_bytes_for_level_base * MiB)); + }}, + {"rocksdb.max_bytes_for_level_multiplier", [this](Server* srv, const std::string &k, + const std::string& v)->Status { + if (!srv) return Status::OK(); + if (!RocksDB.level_compaction_dynamic_level_bytes) { + return Status(Status::NotOK, errNotSetLevelCompactionDynamicLevelBytes); + } + return srv->storage_->SetColumnFamilyOption(trimRocksDBPrefix(k), v); + }}, + {"rocksdb.level_compaction_dynamic_level_bytes", [this](Server* srv, const std::string &k, + const std::string& v)->Status { + if (!srv) return Status::OK(); + if (!RocksDB.level_compaction_dynamic_level_bytes) { + return Status(Status::NotOK, errNotSetLevelCompactionDynamicLevelBytes); + } Review Comment: this judgement is necessary? a mistake? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@kvrocks.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org