From 26541860d322d0b1c2027330c810fc6311284ed0 Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Thu, 23 May 2013 11:56:19 -0700 Subject: [PATCH] The max size of the write buffer size can be 64 GB. Summary: There was an artifical limit on the size of the write buffer size. Test Plan: make check Reviewers: haobo Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D10911 --- db/db_impl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index ba8d9ff53..76fec5ef6 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -123,7 +123,8 @@ Options SanitizeOptions(const std::string& dbname, result.comparator = icmp; result.filter_policy = (src.filter_policy != nullptr) ? ipolicy : nullptr; ClipToRange(&result.max_open_files, 20, 1000000); - ClipToRange(&result.write_buffer_size, 64<<10, 1<<30); + ClipToRange(&result.write_buffer_size, ((size_t)64)<<10, + ((size_t)64)<<30); ClipToRange(&result.block_size, 1<<10, 4<<20); if (result.info_log == nullptr) { Status s = CreateLoggerFromOptions(dbname, result.db_log_dir, src.env,