Ryan4253 commented on code in PR #3034:
URL: https://github.com/apache/kvrocks/pull/3034#discussion_r2162516090
##########
kvrocks.conf:
##########
@@ -886,14 +886,18 @@ rocksdb.delayed_write_rate 0
# Default: no
rocksdb.enable_pipelined_write no
-# Soft limit on number of level-0 files. We start slowing down writes at this
-# point. A value <0 means that no writing slow down will be triggered by
-# number of files in level-0.
+# Soft limit on number of level-0 files. We slow down writes at this point.
+# A value of 0 means that no writing slow down will be triggered by number
+# of files in level-0. If this value is smaller than
+# rocksdb.level0_file_num_compaction_trigger, this will be set to
+# rocksdb.level0_file_num_compaction_trigger instead
Review Comment:
1. Within RocksDB, when ```level0_slowdown_writes_trigger``` <
```level0_file_num_compaction_trigger```, it is set to
```level0_file_num_compaction_trigger```, which isn't the same as disabling
slowdown. We want to set it to ```level_stop_writes_trigger``` instead so we
need our own logic.
2. ```level0_file_num_compaction_trigger``` is always > 0 in our code:
```cpp
{"rocksdb.level0_file_num_compaction_trigger", false,
new IntField(&rocks_db.level0_file_num_compaction_trigger, 4, 1,
1024)},
```
If ```level0_file_num_compaction_trigger``` >
```level_stop_writes_trigger``` and ```level0_slowdown_writes_trigger``` is set
to 0, everything would be set to ```level0_file_num_compaction_trigger``` which
is valid.
--
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]