Update DirectoryMonitor.cpp

This commit is contained in:
zhongyuankai 2022-09-27 11:00:38 +08:00 committed by GitHub
parent 060402cab7
commit d497b72f80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -819,10 +819,18 @@ struct StorageDistributedDirectoryMonitor::Batch
}
else
{
std::vector<std::string> files(file_index_to_path.size());
std::vector<std::string> files;
for (const auto && file_info : file_index_to_path | boost::adaptors::indexed())
files[file_info.index()] = file_info.value().second;
e.addMessage(fmt::format("While sending batch {}", fmt::join(files, "\n")));
{
if (file_info.index() > 8)
{
files.push_back("...");
break;
}
files.push_back(file_info.value().second);
}
e.addMessage(fmt::format("While sending batch, nums: {}, files: {}", file_index_to_path.size(), fmt::join(files, "\n")));
throw;
}