diff --git a/db/db_impl.cc b/db/db_impl.cc index de87e07..72526c1 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -602,9 +602,9 @@ void DBImpl::CompactRange(const Slice* begin, const Slice* end) { void DBImpl::TEST_CompactRange(int level, const Slice* begin, const Slice* end) { assert(level >= 0); - assert(level <= config::kNumLevels); + assert(level < config::kNumLevels); - if (level == config::kNumLevels) { + if (level + 1 == config::kNumLevels) { // TTL: TODO: update files in the last level return; }