[RocksDB] Fix FindMinimumEmptyLevelFitting

Summary: as title

Test Plan: make check;

Reviewers: xjin

CC: leveldb

Differential Revision: https://reviews.facebook.net/D11751
This commit is contained in:
Haobo Xu 2013-07-22 12:19:46 -07:00
parent 9ee68871dc
commit d364eea1fc

View File

@ -928,7 +928,7 @@ void DBImpl::CompactRange(const Slice* begin, const Slice* end,
int DBImpl::FindMinimumEmptyLevelFitting(int level) {
mutex_.AssertHeld();
int minimum_level = level;
for (int i = level - 1; i > 0; ++i) {
for (int i = level - 1; i > 0; --i) {
// stop if level i is not empty
if (versions_->NumLevelFiles(i) > 0) break;