Fix stress test `SetOptions()` setting incompatible options (#12827)

Summary:
To fix errors like "Verification failed: SetOptions failed: Invalid argument: max_successive_merges > 0 is incompatible with unordered_write".

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12827

Test Plan: no new crash test failure due to this option combination.

Reviewed By: hx235

Differential Revision: D59233002

Pulled By: cbi42

fbshipit-source-id: 2a3e4d57a56f07bdda49ea36f0f9f6a30f17bbc3
This commit is contained in:
Changyu Bi 2024-07-01 12:17:22 -07:00 committed by Facebook GitHub Bot
parent 69ad597b46
commit 9eebaf11cb
1 changed files with 6 additions and 1 deletions

View File

@ -286,7 +286,6 @@ bool StressTest::BuildOptionsTable() {
std::to_string(options_.write_buffer_size / 8),
}},
{"memtable_huge_page_size", {"0", std::to_string(2 * 1024 * 1024)}},
{"max_successive_merges", {"0", "2", "4"}},
{"strict_max_successive_merges", {"false", "true"}},
{"inplace_update_num_locks", {"100", "200", "300"}},
// TODO: re-enable once internal task T124324915 is fixed.
@ -343,6 +342,12 @@ bool StressTest::BuildOptionsTable() {
}},
{"max_sequential_skip_in_iterations", {"4", "8", "12"}},
};
if (FLAGS_unordered_write) {
options_tbl.emplace("max_successive_merges", std::vector<std::string>{"0"});
} else {
options_tbl.emplace("max_successive_merges",
std::vector<std::string>{"0", "2", "4"});
}
if (FLAGS_allow_setting_blob_options_dynamically) {
options_tbl.emplace("enable_blob_files",