diff --git a/db_stress_tool/db_stress_common.h b/db_stress_tool/db_stress_common.h index 85f2baa726..7af07645bd 100644 --- a/db_stress_tool/db_stress_common.h +++ b/db_stress_tool/db_stress_common.h @@ -251,6 +251,7 @@ DECLARE_int32(get_property_one_in); DECLARE_string(file_checksum_impl); DECLARE_int32(data_block_index_type); DECLARE_double(data_block_hash_table_util_ratio); +DECLARE_bool(use_dynamic_delay); #ifndef ROCKSDB_LITE // Options for StackableDB-based BlobDB diff --git a/db_stress_tool/db_stress_gflags.cc b/db_stress_tool/db_stress_gflags.cc index 275b94dfaa..bdd8ee22ec 100644 --- a/db_stress_tool/db_stress_gflags.cc +++ b/db_stress_tool/db_stress_gflags.cc @@ -1061,4 +1061,7 @@ DEFINE_uint64(stats_dump_period_sec, ROCKSDB_NAMESPACE::Options().stats_dump_period_sec, "Gap between printing stats to log in seconds"); +DEFINE_bool(use_dynamic_delay, ROCKSDB_NAMESPACE::Options().use_dynamic_delay, + "Use dynamic delay"); + #endif // GFLAGS diff --git a/db_stress_tool/db_stress_test_base.cc b/db_stress_tool/db_stress_test_base.cc index 04a9f7384c..97efbfc251 100644 --- a/db_stress_tool/db_stress_test_base.cc +++ b/db_stress_tool/db_stress_test_base.cc @@ -3123,6 +3123,7 @@ void InitializeOptionsFromFlags( FLAGS_verify_sst_unique_id_in_manifest; options.memtable_protection_bytes_per_key = FLAGS_memtable_protection_bytes_per_key; + options.use_dynamic_delay = FLAGS_use_dynamic_delay; // Integrated BlobDB options.enable_blob_files = FLAGS_enable_blob_files; diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 3ac4677750..0afa675579 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -206,6 +206,7 @@ "customopspercent": 0, "filter_uri": lambda: random.choice(["speedb.PairedBloomFilter", ""]), "memtablerep": lambda: random.choice(["skip_list", "speedb.HashSpdRepFactory"]), + "use_dynamic_delay": lambda: random.choice([0, 1, 1, 1]), } _TEST_DIR_ENV_VAR = 'TEST_TMPDIR'