Skip to content

Commit

Permalink
db_bench: Fix compilation issues on Mac (#393)
Browse files Browse the repository at this point in the history
A few different compilation issues requiring static_cast
  • Loading branch information
mrambacher authored and ayulas committed Feb 26, 2023
1 parent b5cd37f commit 972f1ec
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -860,19 +860,23 @@ DEFINE_int32(file_opening_threads,
"threads that will be used to open files during DB::Open()");

DEFINE_int32(compaction_readahead_size,
ROCKSDB_NAMESPACE::Options().compaction_readahead_size,
static_cast<int32_t>(
ROCKSDB_NAMESPACE::Options().compaction_readahead_size),
"Compaction readahead size");

DEFINE_int32(log_readahead_size,
ROCKSDB_NAMESPACE::Options().log_readahead_size,
"WAL and manifest readahead size");
DEFINE_int32(
log_readahead_size,
static_cast<int32_t>(ROCKSDB_NAMESPACE::Options().log_readahead_size),
"WAL and manifest readahead size");

DEFINE_int32(random_access_max_buffer_size,
ROCKSDB_NAMESPACE::Options().random_access_max_buffer_size,
static_cast<int32_t>(
ROCKSDB_NAMESPACE::Options().random_access_max_buffer_size),
"Maximum windows randomaccess buffer size");

DEFINE_int32(writable_file_max_buffer_size,
ROCKSDB_NAMESPACE::Options().writable_file_max_buffer_size,
static_cast<int32_t>(
ROCKSDB_NAMESPACE::Options().writable_file_max_buffer_size),
"Maximum write buffer for Writable File");

DEFINE_double(bloom_bits, -1,
Expand Down Expand Up @@ -1863,8 +1867,10 @@ DEFINE_int32(skip_list_lookahead, 0, "Used with skip_list memtablerep; try "
DEFINE_bool(report_file_operations, false, "if report number of file "
"operations");
DEFINE_bool(report_open_timing, false, "if report open timing");
DEFINE_int32(readahead_size, ROCKSDB_NAMESPACE::ReadOptions().readahead_size,
"Iterator readahead size");
DEFINE_int32(
readahead_size,
static_cast<int32_t>(ROCKSDB_NAMESPACE::ReadOptions().readahead_size),
"Iterator readahead size");

DEFINE_bool(read_with_latest_user_timestamp, true,
"If true, always use the current latest timestamp for read. If "
Expand Down

0 comments on commit 972f1ec

Please sign in to comment.