Fixed compile error in db/compaction.cc and db/compaction_picker.cc
Summary: Fixed compile error in db/compaction.cc and db/compaction_picker.cc Test Plan: make
This commit is contained in:
parent
68effa0348
commit
642ac9d8ab
@ -89,7 +89,7 @@ Compaction::Compaction(VersionStorageInfo* vstorage,
|
|||||||
max_output_file_size_(options.output_file_size_limit),
|
max_output_file_size_(options.output_file_size_limit),
|
||||||
max_grandparent_overlap_bytes_(max_grandparent_overlap_bytes),
|
max_grandparent_overlap_bytes_(max_grandparent_overlap_bytes),
|
||||||
input_version_(nullptr), // TODO(yhchiang): set it later
|
input_version_(nullptr), // TODO(yhchiang): set it later
|
||||||
number_levels_(vstorage->NumberLevels()),
|
number_levels_(vstorage->num_levels()),
|
||||||
cfd_(nullptr),
|
cfd_(nullptr),
|
||||||
output_compression_(options.compression),
|
output_compression_(options.compression),
|
||||||
seek_compaction_(false),
|
seek_compaction_(false),
|
||||||
|
@ -201,7 +201,7 @@ Compaction* CompactionPicker::FormCompaction(
|
|||||||
int output_level, VersionStorageInfo* vstorage,
|
int output_level, VersionStorageInfo* vstorage,
|
||||||
const MutableCFOptions& mutable_cf_options) const {
|
const MutableCFOptions& mutable_cf_options) const {
|
||||||
uint64_t max_grandparent_overlap_bytes =
|
uint64_t max_grandparent_overlap_bytes =
|
||||||
output_level + 1 < vstorage->NumberLevels() ?
|
output_level + 1 < vstorage->num_levels() ?
|
||||||
mutable_cf_options.MaxGrandParentOverlapBytes(output_level + 1) :
|
mutable_cf_options.MaxGrandParentOverlapBytes(output_level + 1) :
|
||||||
std::numeric_limits<uint64_t>::max();
|
std::numeric_limits<uint64_t>::max();
|
||||||
assert(input_files.size());
|
assert(input_files.size());
|
||||||
@ -221,7 +221,7 @@ Compaction* CompactionPicker::FormCompaction(
|
|||||||
// the oldest file is involved.
|
// the oldest file is involved.
|
||||||
c->SetupBottomMostLevel(
|
c->SetupBottomMostLevel(
|
||||||
vstorage,
|
vstorage,
|
||||||
(output_level == vstorage->NumberLevels() - 1),
|
(output_level == vstorage->num_levels() - 1),
|
||||||
(output_level == 0));
|
(output_level == 0));
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
@ -238,12 +238,12 @@ Status CompactionPicker::GetCompactionInputsFromFileNumbers(
|
|||||||
assert(input_files);
|
assert(input_files);
|
||||||
|
|
||||||
autovector<CompactionInputFiles> matched_input_files;
|
autovector<CompactionInputFiles> matched_input_files;
|
||||||
matched_input_files.resize(vstorage->NumberLevels());
|
matched_input_files.resize(vstorage->num_levels());
|
||||||
int first_non_empty_level = -1;
|
int first_non_empty_level = -1;
|
||||||
int last_non_empty_level = -1;
|
int last_non_empty_level = -1;
|
||||||
// TODO(yhchiang): use a lazy-initialized mapping from
|
// TODO(yhchiang): use a lazy-initialized mapping from
|
||||||
// file_number to FileMetaData in Version.
|
// file_number to FileMetaData in Version.
|
||||||
for (int level = 0; level < vstorage->NumberLevels(); ++level) {
|
for (int level = 0; level < vstorage->num_levels(); ++level) {
|
||||||
for (auto file : vstorage->LevelFiles(level)) {
|
for (auto file : vstorage->LevelFiles(level)) {
|
||||||
auto iter = input_set->find(file->fd.GetNumber());
|
auto iter = input_set->find(file->fd.GetNumber());
|
||||||
if (iter != input_set->end()) {
|
if (iter != input_set->end()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user