|
|
@ -274,11 +274,12 @@ class VersionBuilder::Rep { |
|
|
|
auto exising = levels_[level].added_files.find(number); |
|
|
|
auto exising = levels_[level].added_files.find(number); |
|
|
|
if (exising != levels_[level].added_files.end()) { |
|
|
|
if (exising != levels_[level].added_files.end()) { |
|
|
|
UnrefFile(exising->second); |
|
|
|
UnrefFile(exising->second); |
|
|
|
levels_[level].added_files.erase(number); |
|
|
|
levels_[level].added_files.erase(exising); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (invalid_levels_[level].count(number) > 0) { |
|
|
|
auto exising = invalid_levels_[level].find(number); |
|
|
|
invalid_levels_[level].erase(number); |
|
|
|
if (exising != invalid_levels_[level].end()) { |
|
|
|
|
|
|
|
invalid_levels_[level].erase(exising); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// Deleting an non-existing file on invalid level.
|
|
|
|
// Deleting an non-existing file on invalid level.
|
|
|
|
has_invalid_levels_ = true; |
|
|
|
has_invalid_levels_ = true; |
|
|
|