mapleFU commented on code in PR #3034:
URL: https://github.com/apache/kvrocks/pull/3034#discussion_r2179082072


##########
src/config/config.cc:
##########
@@ -728,6 +728,26 @@ void Config::initFieldCallback() {
          
srv->storage->SetSstFileDeleteRateBytesPerSecond(rocks_db.sst_file_delete_rate_bytes_per_sec);
          return Status::OK();
        }},
+      {"rocksdb.level0_slowdown_writes_trigger",
+       [this, &set_cf_option_cb](Server *srv, const std::string &k, 
[[maybe_unused]] const std::string &v) -> Status {
+         if (rocks_db.level0_slowdown_writes_trigger == 0) {
+           return set_cf_option_cb(srv, k, 
std::to_string(rocks_db.level0_stop_writes_trigger));
+         } else {
+           return set_cf_option_cb(srv, k, 
std::to_string(rocks_db.level0_slowdown_writes_trigger));
+         }
+       }},
+      {"rocksdb.level0_stop_writes_trigger",
+       [this, &set_cf_option_cb](Server *srv, const std::string &k, 
[[maybe_unused]] const std::string &v) -> Status {
+         if (rocks_db.level0_slowdown_writes_trigger == 0) {
+           Status s = set_cf_option_cb(srv, 
"rocksdb.level0_slowdown_writes_trigger",
+                                       
std::to_string(rocks_db.level0_stop_writes_trigger));
+           if (!s.IsOK()) {
+             return s;
+           }
+         }
+
+         return set_cf_option_cb(srv, k, 
std::to_string(rocks_db.level0_stop_writes_trigger));

Review Comment:
   > Let's set them together with std::map
   
   Yeah, I'll try to approve if this is done



-- 
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-unsubscr...@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to