30 seconds files flush

This commit is contained in:
Andrea Cavalli 2020-05-16 23:25:11 +02:00
parent 76e779eaf8
commit 5326481f04

View File

@ -3704,7 +3704,7 @@ void FileManager::memory_cleanup() {
auto time = std::time(nullptr);
for (unsigned int i = 1; i < file_id_info_.size(); i++) {
if (time - file_id_insert_time_[i] > 60 * 5) {
if (time - file_id_insert_time_[i] > 30 /* DELETE FILES OLDER THAN X SECONDS */) {
empty_file_ids_.push_back(i);
file_id_insert_time_[i] = INT64_MAX;
file_nodes_[file_id_info_[i].node_id_] = nullptr;