Changeset View
Changeset View
Standalone View
Standalone View
src/leveldb/db/version_set.cc
Show All 14 Lines | |||||
#include "leveldb/table_builder.h" | #include "leveldb/table_builder.h" | ||||
#include "table/merger.h" | #include "table/merger.h" | ||||
#include "table/two_level_iterator.h" | #include "table/two_level_iterator.h" | ||||
#include "util/coding.h" | #include "util/coding.h" | ||||
#include "util/logging.h" | #include "util/logging.h" | ||||
namespace leveldb { | namespace leveldb { | ||||
static int TargetFileSize(const Options* options) { | static size_t TargetFileSize(const Options* options) { | ||||
return options->max_file_size; | return options->max_file_size; | ||||
} | } | ||||
// Maximum bytes of overlaps in grandparent (i.e., level+2) before we | // Maximum bytes of overlaps in grandparent (i.e., level+2) before we | ||||
// stop building a single file in a level->level+1 compaction. | // stop building a single file in a level->level+1 compaction. | ||||
static int64_t MaxGrandParentOverlapBytes(const Options* options) { | static int64_t MaxGrandParentOverlapBytes(const Options* options) { | ||||
return 10 * TargetFileSize(options); | return 10 * TargetFileSize(options); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,504 Lines • Show Last 20 Lines |