Skip to content

Commit

Permalink
Fix "assertion failed - iter != ROCKSDB_NAMESPACE::OptionsHelper::tem…
Browse files Browse the repository at this point in the history
…perature_to_string.end()" (facebook#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: facebook#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
  • Loading branch information
hx235 authored and facebook-github-bot committed Apr 8, 2024
1 parent ad423ab commit 72c1376
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions db_stress_tool/db_stress_gflags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1331,20 +1331,13 @@ DEFINE_uint32(
static_cast<uint32_t>(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()
Expand Down

0 comments on commit 72c1376

Please sign in to comment.