Add warnings about big file nodes.

This commit is contained in:
levlam 2022-10-05 16:32:16 +03:00
parent 7c2fae669a
commit 59acbf6d15
2 changed files with 7 additions and 0 deletions

View File

@ -1702,6 +1702,11 @@ Result<FileId> FileManager::merge(FileId x_file_id, FileId y_file_id, bool no_sy
node->on_info_changed();
}
if (node->file_ids_.size() > (1u << file_node_size_warning_exp_)) {
LOG(WARNING) << "File of type " << file_view.get_type() << " has " << node->file_ids_.size() << " file identifiers";
file_node_size_warning_exp_++;
}
// Check if some download/upload queries are ready
for (auto file_id : vector<FileId>(node->file_ids_)) {
auto *info = get_file_id_info(file_id);

View File

@ -602,6 +602,8 @@ class FileManager final : public FileLoadManager::Callback {
std::set<std::string> bad_paths_;
int file_node_size_warning_exp_ = 12;
FileId next_file_id();
FileNodeId next_file_node_id();
int32 next_pmc_file_id();