Skip to content

Commit

Permalink
Fix unsigned int flag in db_bench (facebook#4129)
Browse files Browse the repository at this point in the history
Summary:
`DEFINE_uint32` was unavailable on some platforms, e.g., https://travis-ci.org/facebook/rocksdb/jobs/403352902. Use `DEFINE_uint64` instead which should work as it's used many times elsewhere in this file.
Pull Request resolved: facebook#4129

Differential Revision: D8830311

Pulled By: ajkr

fbshipit-source-id: b4fc90ba3f50e649c070ce8069c68e530d731f05
  • Loading branch information
ajkr authored and facebook-github-bot committed Jul 13, 2018
1 parent 520bbb1 commit 97fe23f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ DEFINE_bool(identity_as_first_hash, false, "the first hash function of cuckoo "
"table becomes an identity function. This is only valid when key "
"is 8 bytes");
DEFINE_bool(dump_malloc_stats, true, "Dump malloc stats in LOG ");
DEFINE_uint32(stats_dump_period_sec, rocksdb::Options().stats_dump_period_sec,
DEFINE_uint64(stats_dump_period_sec, rocksdb::Options().stats_dump_period_sec,
"Gap between printing stats to log in seconds");

enum RepFactory {
Expand Down Expand Up @@ -3369,7 +3369,8 @@ void VerifyDBFromDB(std::string& truth_db_name) {
options.wal_dir = FLAGS_wal_dir;
options.create_if_missing = !FLAGS_use_existing_db;
options.dump_malloc_stats = FLAGS_dump_malloc_stats;
options.stats_dump_period_sec = FLAGS_stats_dump_period_sec;
options.stats_dump_period_sec =
static_cast<unsigned int>(FLAGS_stats_dump_period_sec);

options.compression_opts.level = FLAGS_compression_level;
options.compression_opts.max_dict_bytes = FLAGS_compression_max_dict_bytes;
Expand Down

0 comments on commit 97fe23f

Please sign in to comment.