mirror of
https://github.com/google/leveldb.git
synced 2025-04-15 13:20:37 +08:00
Merge ac7e34137c
into ac691084fd
This commit is contained in:
commit
5fc2bf9c9b
@ -231,12 +231,18 @@ void DBImpl::RemoveObsoleteFiles() {
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<std::string> filenames;
|
||||
// Dealing with many thousand file can make getting children very slow.
|
||||
// All file numbers are incremental, so any file produced concurrently
|
||||
// will have same or greater Number.
|
||||
mutex_.Unlock();
|
||||
env_->GetChildren(dbname_, &filenames); // Ignoring errors on purpose
|
||||
mutex_.Lock();
|
||||
|
||||
// Make a set of all of the live files
|
||||
std::set<uint64_t> live = pending_outputs_;
|
||||
versions_->AddLiveFiles(&live);
|
||||
|
||||
std::vector<std::string> filenames;
|
||||
env_->GetChildren(dbname_, &filenames); // Ignoring errors on purpose
|
||||
uint64_t number;
|
||||
FileType type;
|
||||
std::vector<std::string> files_to_delete;
|
||||
|
Loading…
Reference in New Issue
Block a user