From 9eebaf11cbd875435b572f05f0378ecdb761cc74 Mon Sep 17 00:00:00 2001 From: Changyu Bi Date: Mon, 1 Jul 2024 12:17:22 -0700 Subject: [PATCH] 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 --- db_stress_tool/db_stress_test_base.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db_stress_tool/db_stress_test_base.cc b/db_stress_tool/db_stress_test_base.cc index 0e7e9ec44f..28304affda 100644 --- a/db_stress_tool/db_stress_test_base.cc +++ b/db_stress_tool/db_stress_test_base.cc @@ -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{"0"}); + } else { + options_tbl.emplace("max_successive_merges", + std::vector{"0", "2", "4"}); + } if (FLAGS_allow_setting_blob_options_dynamically) { options_tbl.emplace("enable_blob_files",