From d364eea1fc615917133c49b5fed2acf1e884fbec Mon Sep 17 00:00:00 2001 From: Haobo Xu Date: Mon, 22 Jul 2013 12:19:46 -0700 Subject: [PATCH] [RocksDB] Fix FindMinimumEmptyLevelFitting Summary: as title Test Plan: make check; Reviewers: xjin CC: leveldb Differential Revision: https://reviews.facebook.net/D11751 --- db/db_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 03d88708a..326b61e83 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -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;