Ankit Gupta 11 years ago
commit 6b0cc410e5
  1. 5
      db/column_family.cc
  2. 1
      db/filename.cc

@ -63,8 +63,13 @@ ColumnFamilyOptions SanitizeOptions(const InternalKeyComparator* icmp,
ColumnFamilyOptions result = src; ColumnFamilyOptions result = src;
result.comparator = icmp; result.comparator = icmp;
result.filter_policy = (src.filter_policy != nullptr) ? ipolicy : nullptr; result.filter_policy = (src.filter_policy != nullptr) ? ipolicy : nullptr;
#ifdef OS_MACOSX
// TODO(icanadi) make write_buffer_size uint64_t instead of size_t
ClipToRange(&result.write_buffer_size, ((size_t)64) << 10, ((size_t)1) << 30);
#else
ClipToRange(&result.write_buffer_size, ClipToRange(&result.write_buffer_size,
((size_t)64) << 10, ((size_t)64) << 30); ((size_t)64) << 10, ((size_t)64) << 30);
#endif
// if user sets arena_block_size, we trust user to use this value. Otherwise, // if user sets arena_block_size, we trust user to use this value. Otherwise,
// calculate a proper value from writer_buffer_size; // calculate a proper value from writer_buffer_size;
if (result.arena_block_size <= 0) { if (result.arena_block_size <= 0) {

@ -88,7 +88,6 @@ std::string LockFileName(const std::string& dbname) {
} }
std::string TempFileName(const std::string& dbname, uint64_t number) { std::string TempFileName(const std::string& dbname, uint64_t number) {
assert(number >= 0);
return MakeFileName(dbname, number, "dbtmp"); return MakeFileName(dbname, number, "dbtmp");
} }

Loading…
Cancel
Save