Fix compaction_picker_test
This commit is contained in:
parent
e39f4f6cf9
commit
3e53760fc4
@ -31,7 +31,6 @@ class CompactionPickerTest {
|
|||||||
LogBuffer log_buffer_;
|
LogBuffer log_buffer_;
|
||||||
uint32_t file_num_;
|
uint32_t file_num_;
|
||||||
CompactionOptionsFIFO fifo_options_;
|
CompactionOptionsFIFO fifo_options_;
|
||||||
std::vector<uint64_t> size_being_compacted_;
|
|
||||||
std::unique_ptr<VersionStorageInfo> vstorage_;
|
std::unique_ptr<VersionStorageInfo> vstorage_;
|
||||||
std::vector<std::unique_ptr<FileMetaData>> files_;
|
std::vector<std::unique_ptr<FileMetaData>> files_;
|
||||||
|
|
||||||
@ -47,7 +46,6 @@ class CompactionPickerTest {
|
|||||||
vstorage_(nullptr) {
|
vstorage_(nullptr) {
|
||||||
fifo_options_.max_table_files_size = 1;
|
fifo_options_.max_table_files_size = 1;
|
||||||
mutable_cf_options_.RefreshDerivedOptions(ioptions_);
|
mutable_cf_options_.RefreshDerivedOptions(ioptions_);
|
||||||
size_being_compacted_.resize(options_.num_levels);
|
|
||||||
ioptions_.db_paths.emplace_back("dummy",
|
ioptions_.db_paths.emplace_back("dummy",
|
||||||
std::numeric_limits<uint64_t>::max());
|
std::numeric_limits<uint64_t>::max());
|
||||||
}
|
}
|
||||||
@ -87,6 +85,7 @@ class CompactionPickerTest {
|
|||||||
vstorage_->UpdateNumNonEmptyLevels();
|
vstorage_->UpdateNumNonEmptyLevels();
|
||||||
vstorage_->GenerateFileIndexer();
|
vstorage_->GenerateFileIndexer();
|
||||||
vstorage_->GenerateLevelFilesBrief();
|
vstorage_->GenerateLevelFilesBrief();
|
||||||
|
vstorage_->ComputeCompactionScore(mutable_cf_options_, fifo_options_);
|
||||||
vstorage_->SetFinalized();
|
vstorage_->SetFinalized();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user