|
@ -1532,7 +1532,7 @@ bool Compaction::IsBaseLevelForKey(const Slice& user_key) { |
|
|
const Comparator* user_cmp = input_version_->vset_->icmp_.user_comparator(); |
|
|
const Comparator* user_cmp = input_version_->vset_->icmp_.user_comparator(); |
|
|
for (int lvl = level_ + 2; lvl < config::kNumLevels; lvl++) { |
|
|
for (int lvl = level_ + 2; lvl < config::kNumLevels; lvl++) { |
|
|
const std::vector<FileMetaData*>& files = input_version_->files_[lvl]; |
|
|
const std::vector<FileMetaData*>& files = input_version_->files_[lvl]; |
|
|
for (; level_ptrs_[lvl] < files.size();) { |
|
|
|
|
|
|
|
|
while (level_ptrs_[lvl] < files.size()) { |
|
|
FileMetaData* f = files[level_ptrs_[lvl]]; |
|
|
FileMetaData* f = files[level_ptrs_[lvl]]; |
|
|
if (user_cmp->Compare(user_key, f->largest.user_key()) <= 0) { |
|
|
if (user_cmp->Compare(user_key, f->largest.user_key()) <= 0) { |
|
|
// We've advanced far enough
|
|
|
// We've advanced far enough
|
|
|