The target file size for L0 files was incorrectly set to LLONG_MAX.
Summary: The target file size should be valid value. Only if UniversalCompactionStyle is enabled then set max file size to be LLONG_MAX. Test Plan: Reviewers: CC: Task ID: # Blame Rev:
This commit is contained in:
parent
9357a53a7d
commit
a91fdf1b99
@ -1039,8 +1039,8 @@ void VersionSet::Init(int num_levels) {
|
|||||||
int target_file_size_multiplier = options_->target_file_size_multiplier;
|
int target_file_size_multiplier = options_->target_file_size_multiplier;
|
||||||
int max_bytes_multiplier = options_->max_bytes_for_level_multiplier;
|
int max_bytes_multiplier = options_->max_bytes_for_level_multiplier;
|
||||||
for (int i = 0; i < num_levels; i++) {
|
for (int i = 0; i < num_levels; i++) {
|
||||||
if (i == 0) {
|
if (i == 0 && options_->compaction_style == kCompactionStyleUniversal) {
|
||||||
max_file_size_[i] = LLONG_MAX;
|
max_file_size_[i] = ULLONG_MAX;
|
||||||
level_max_bytes_[i] = options_->max_bytes_for_level_base;
|
level_max_bytes_[i] = options_->max_bytes_for_level_base;
|
||||||
} else if (i > 1) {
|
} else if (i > 1) {
|
||||||
max_file_size_[i] = max_file_size_[i-1] * target_file_size_multiplier;
|
max_file_size_[i] = max_file_size_[i-1] * target_file_size_multiplier;
|
||||||
|
Loading…
Reference in New Issue
Block a user