You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "nathanlo-hrt (via GitHub)" <gi...@apache.org> on 2025/06/04 19:49:45 UTC
[PR] feat: Make rocksdb.min_write_buffer_number_to_merge configurable [kvrocks]
nathanlo-hrt opened a new pull request, #3016:
URL: https://github.com/apache/kvrocks/pull/3016
It's useful to configure this.
--
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
Re: [PR] feat: Make rocksdb.min_write_buffer_number_to_merge configurable [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016#discussion_r2127799209
##########
kvrocks.conf:
##########
@@ -728,6 +728,13 @@ rocksdb.target_file_size_base 128
# allowed.
rocksdb.max_write_buffer_number 4
+# The minimum number of write buffers that will be merged together
+# during compaction.
+#
+# Default: 2
+rocksdb.min_write_buffer_number_to_merge 2
Review Comment:
Keep the same default value with RocksDB.
```suggestion
# Default: 1
rocksdb.min_write_buffer_number_to_merge 1
```
##########
tests/cppunit/config_test.cc:
##########
@@ -65,6 +65,7 @@ TEST(Config, GetAndSet) {
{"rocksdb.max_open_files", "1234"},
{"rocksdb.write_buffer_size", "1234"},
{"rocksdb.max_write_buffer_number", "1"},
+ {"rocksdb.min_write_buffer_number_to_merge", "2"},
Review Comment:
```suggestion
{"rocksdb.min_write_buffer_number_to_merge", "1"},
```
##########
src/config/config.cc:
##########
@@ -252,6 +252,8 @@ Config::Config() {
{"rocksdb.max_open_files", false, new IntField(&rocks_db.max_open_files, 8096, -1, INT_MAX)},
{"rocksdb.write_buffer_size", false, new IntField(&rocks_db.write_buffer_size, 64, 0, 4096)},
{"rocksdb.max_write_buffer_number", false, new IntField(&rocks_db.max_write_buffer_number, 4, 0, 256)},
+ {"rocksdb.min_write_buffer_number_to_merge", false,
+ new IntField(&rocks_db.min_write_buffer_number_to_merge, 4, 1, 256)},
Review Comment:
```suggestion
new IntField(&rocks_db.min_write_buffer_number_to_merge, 1, 1, 256)},
```
--
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
Re: [PR] feat: Make rocksdb.min_write_buffer_number_to_merge configurable [kvrocks]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016#issuecomment-2942044049
## [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3016) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=3016&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=3016&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=3016&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [66.7% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=3016&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=3016&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3016)
--
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
Re: [PR] feat(config): allow to configure the rocksdb.min_write_buffer_number_to_merge [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016#issuecomment-2947629063
@nathanlo-hrt Oh, where's this assignment? It will default to 1 from the rocksdb source code: https://github.com/facebook/rocksdb/blob/7d80ea45442e84c25669db61cb7376ba0cd10ba5/include/rocksdb/advanced_options.h#L187
--
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
Re: [PR] feat(config): allow to configure the rocksdb.min_write_buffer_number_to_merge [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice merged PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016
--
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
Re: [PR] feat(config): allow to configure the rocksdb.min_write_buffer_number_to_merge [kvrocks]
Posted by "nathanlo-hrt (via GitHub)" <gi...@apache.org>.
nathanlo-hrt commented on PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016#issuecomment-2949327005
https://github.com/nathanlo-hrt/kvrocks/blame/644c6b7666a93e1134641613fb715913ad02beaa/src/storage/storage.cc#L172C12-L172C12
--
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
Re: [PR] feat(config): allow to configure the rocksdb.min_write_buffer_number_to_merge [kvrocks]
Posted by "nathanlo-hrt (via GitHub)" <gi...@apache.org>.
nathanlo-hrt commented on PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016#issuecomment-2944970971
thanks for the review and edits! just fyi the edits would introduce a slight behavior change, since the original line of code reads
```
options.min_write_buffer_number_to_merge = 2;
```
ie. a default value of 2, which will now be 1.
--
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
Re: [PR] feat(config): allow to configure the rocksdb.min_write_buffer_number_to_merge [kvrocks]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016#issuecomment-2942883002
## [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3016) **Quality Gate failed**
Failed conditions
 [29.2% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=3016&metric=new_coverage&view=list) (required ≥ 50%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3016)
--
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
Re: [PR] feat(config): allow to configure the rocksdb.min_write_buffer_number_to_merge [kvrocks]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016#issuecomment-2942649858
## [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3016) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=3016&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=3016&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=3016&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [71.4% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=3016&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=3016&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3016)
--
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
Re: [PR] feat(config): allow to configure the rocksdb.min_write_buffer_number_to_merge [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #3016:
URL: https://github.com/apache/kvrocks/pull/3016#issuecomment-2949566466
> https://github.com/apache/kvrocks/blame/644c6b7666a93e1134641613fb715913ad02beaa/src/storage/storage.cc#L172C12-L172C12
@nathanlo-hrt Thank you. I'm sorry that I didn't notice this option has ever been set in Kvrocks, but it should be good to keep the same default value with RocksDB.
--
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