diff --git a/db/db_impl.cc b/db/db_impl.cc index f075533..86340ae 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -1742,7 +1742,14 @@ void DBImpl::GarbageCollect() { valuelog_set.emplace(filename); } } + bool tmp_judge=false;//only clean one file for (std::string valuelog_name : valuelog_set) { + if(tmp_judge){ + break; + } + else{ + tmp_judge=true; + } uint64_t cur_log_number = GetValueLogID(valuelog_name); valuelog_name = ValueLogFileName(dbname_, cur_log_number); if (cur_log_number == valuelogfile_number_) {