Include candidate files under options.db_log_dir in FindObsoleteFiles()
Summary: In FindObsoleteFiles(), we don't scan db_log_dir. Add it. Test Plan: make all check Reviewers: ljin, igor, yhchiang Reviewed By: yhchiang Subscribers: leveldb, yhchiang Differential Revision: https://reviews.facebook.net/D21429
This commit is contained in:
parent
4632239d13
commit
54153ab07a
@ -588,6 +588,14 @@ void DBImpl::FindObsoleteFiles(DeletionState& deletion_state,
|
||||
deletion_state.candidate_files.emplace_back(log_file, 0);
|
||||
}
|
||||
}
|
||||
// Add info log files in db_log_dir
|
||||
if (options_.db_log_dir.empty() && options_.db_log_dir != dbname_) {
|
||||
std::vector<std::string> info_log_files;
|
||||
env_->GetChildren(options_.db_log_dir, &info_log_files); // Ignore errors
|
||||
for (std::string log_file : info_log_files) {
|
||||
deletion_state.candidate_files.emplace_back(log_file, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user