mapleFU commented on code in PR #3034:
URL: https://github.com/apache/kvrocks/pull/3034#discussion_r2178793574
##########
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:
> Actually I am not too sure about what you mean by 1.
I just means that rocksdb::DBImpl::SetOptions is called twice and some
checking is being done twice
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]