From e4d3f5d9b8fc1f2049992b27f1024843eda7bb9d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Tue, 20 Sep 2016 10:17:28 -0700 Subject: [PATCH] Fix DBImpl::GetWalPreallocateBlockSize Mac build error Summary: Specify type param with std::min to resolve compile error on Mac. Test Plan: https://travis-ci.org/facebook/rocksdb/builds/161223845 Reviewers: sdong Reviewed By: sdong Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D64143 --- db/db_impl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index c2f1ba3dd..c8b1d60fa 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -3687,14 +3687,15 @@ size_t DBImpl::GetWalPreallocateBlockSize(uint64_t write_buffer_size) const { // Some users might set very high write_buffer_size and rely on // max_total_wal_size or other parameters to control the WAL size. if (db_options_.max_total_wal_size > 0) { - bsize = std::min(bsize, db_options_.max_total_wal_size); + bsize = std::min(bsize, db_options_.max_total_wal_size); } if (db_options_.db_write_buffer_size > 0) { - bsize = std::min(bsize, db_options_.db_write_buffer_size); + bsize = std::min(bsize, db_options_.db_write_buffer_size); } if (db_options_.write_buffer_manager && db_options_.write_buffer_manager->enabled()) { - bsize = std::min(bsize, db_options_.write_buffer_manager->buffer_size()); + bsize = std::min(bsize, + db_options_.write_buffer_manager->buffer_size()); } return bsize;