From 72c1376fcf751c89a3e70ba30abd36668025e1bc Mon Sep 17 00:00:00 2001 From: Hui Xiao Date: Mon, 8 Apr 2024 13:45:41 -0700 Subject: [PATCH] Fix "assertion failed - iter != ROCKSDB_NAMESPACE::OptionsHelper::temperature_to_string.end()" (#12519) Summary: Context/Summary: for unknown reason, calling a db stress common function in db stress flag file for temperature-related flags will cause some weird behavior in some compilation/build. ``` assertion failed - iter != ROCKSDB_NAMESPACE::OptionsHelper::temperature_to_string.end() ``` For now, we decide not to call such function by hard-coding their default stress test values. Pull Request resolved: https://github.com/facebook/rocksdb/pull/12519 Test Plan: - Run a rehearsal stress test with this fix and weird behavior is gone. Reviewed By: jowlyzhang Differential Revision: D55884693 Pulled By: hx235 fbshipit-source-id: ba5135f5b37a9fa686b3ccae8d3f77e62d6562c9 --- db_stress_tool/db_stress_gflags.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/db_stress_tool/db_stress_gflags.cc b/db_stress_tool/db_stress_gflags.cc index 6857882038d..53a35666aa8 100644 --- a/db_stress_tool/db_stress_gflags.cc +++ b/db_stress_tool/db_stress_gflags.cc @@ -1331,20 +1331,13 @@ DEFINE_uint32( static_cast(ROCKSDB_NAMESPACE::TieredCacheOptions().adm_policy), "TieredCacheOptions.adm_policy"); -DEFINE_string(last_level_temperature, - ROCKSDB_NAMESPACE::TemperatureToString( - ROCKSDB_NAMESPACE::Options().last_level_temperature), +DEFINE_string(last_level_temperature, "kUnknown", "Options.last_level_temperature"); -DEFINE_string(default_write_temperature, - ROCKSDB_NAMESPACE::TemperatureToString( - ROCKSDB_NAMESPACE::Options().default_write_temperature), +DEFINE_string(default_write_temperature, "kUnknown", "Options.default_write_temperature"); -DEFINE_string(default_temperature, - ROCKSDB_NAMESPACE::TemperatureToString( - ROCKSDB_NAMESPACE::Options().default_temperature), - "Options.default_temperature"); +DEFINE_string(default_temperature, "kUnknown", "Options.default_temperature"); DEFINE_bool(enable_memtable_insert_with_hint_prefix_extractor, ROCKSDB_NAMESPACE::Options()