You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "paragor (via GitHub)" <gi...@apache.org> on 2024/10/21 08:17:43 UTC
Re: [PR] feat(config): add `rocksdb.compression_start_level` to allow configure levels without compression [kvrocks]
paragor commented on code in PR #2605:
URL: https://github.com/apache/kvrocks/pull/2605#discussion_r1808305119
##########
src/config/config.cc:
##########
@@ -368,12 +371,11 @@ void Config::initFieldCallback() {
return srv->storage->SetOptionForAllColumnFamilies(TrimRocksDbPrefix(k), v);
};
auto set_compression_type_cb = [](Server *srv, [[maybe_unused]] const std::string &k,
- const std::string &v) -> Status {
+ [[maybe_unused]] const std::string &v) -> Status {
if (!srv) return Status::OK();
-
std::string compression_option;
for (auto &option : engine::CompressionOptions) {
- if (option.name == v) {
+ if (option.type == srv->GetConfig()->rocks_db.compression) {
Review Comment:
i'am do it in separate commit, but i dont see any benefits. validation of fields is done already in IntField and EnumField<rocksdb::CompressionType>, so no need validate options again.
set_db_option_cb used more then 1 times for example
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org