Skip to content

Commit

Permalink
stress test: Fix flag validation in Enable Speedb Features (#814)
Browse files Browse the repository at this point in the history
Fixes a bug where ValidateEnableSpeedbFlags() checks for non existing parameters in db_stress
  • Loading branch information
ofriedma authored Jan 29, 2024
1 parent 536f779 commit ed41ab5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Based on RocksDB 8.6.7
* LOG Enhancement: Have a separate LOG entry per CF Stats. This ensures that no CF stats data is lost in case the size of the combined CF stats text exceeds the LOG's threshold (#534).

### Bug Fixes
* Fix a bug in db_stress where non existence parameters have checked with enable_speedb_features.
* Added IsRefreshIterSupported() to memtable_rep, to publish if the memtable support Refresh() of the iterator.
Refresh() will return status NotSupported for memtables that do not support Refresh().
IsAllowRefresh() has been added.
Expand Down
28 changes: 15 additions & 13 deletions db_stress_tool/db_stress_test_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,21 @@ bool is_default(const char* flag_name) {
}

void ValidateEnableSpeedbFlags() {
std::vector<std::string> confilct_flags = {
"num_high_pri_threads", "num_bottom_pri_threads",
"num_bottom_pri_threads", "num_low_pri_threads",
"max_background_compactions", "max_background_flushes", "cache_size",
"cache_type",
// Assume simcache_size default is disabled simcache
"simcache_size", "memtablerep", "pinning_policy",
"scoped_pinning_capacity", "use_ribbon_filter", "bloom_bits",
"allow_wbm_stalls", "db_write_buffer_size", "initiate_wbm_flushes",
"bytes_per_sync", "use_dynamic_delay", "memtable_bloom_size_ratio",
"whole_key_filtering", "optimize_filters_for_hits",
"max_num_parallel_flushes", "start_delay_percent",
"max_num_parallel_flushes", "use_blob_cache"};
std::vector<std::string> confilct_flags = {"max_background_compactions",
"max_background_flushes",
"cache_size",
"cache_type",
"memtablerep",
"pinning_policy",
"bloom_bits",
"allow_wbm_stalls",
"db_write_buffer_size",
"initiate_wbm_flushes",
"bytes_per_sync",
"use_dynamic_delay",
"start_delay_percent",
"max_num_parallel_flushes",
"use_blob_cache"};

if (FLAGS_enable_speedb_features && !FLAGS_crash_test) {
if (is_default("max_background_jobs") || is_default("total_ram_size")) {
Expand Down

0 comments on commit ed41ab5

Please sign in to comment.