From 97fe23fc5c87e0a4deb4d9260e05ee608945e981 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Thu, 12 Jul 2018 18:30:37 -0700 Subject: [PATCH] Fix unsigned int flag in db_bench (#4129) 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: https://github.com/facebook/rocksdb/pull/4129 Differential Revision: D8830311 Pulled By: ajkr fbshipit-source-id: b4fc90ba3f50e649c070ce8069c68e530d731f05 --- tools/db_bench_tool.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 5915692f8..20abdd56e 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -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 { @@ -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(FLAGS_stats_dump_period_sec); options.compression_opts.level = FLAGS_compression_level; options.compression_opts.max_dict_bytes = FLAGS_compression_max_dict_bytes;