Output partial local in on_partial_download.

GitOrigin-RevId: 3f7177d704f4eaf7dec13e7bad13cb2b48da91e9
This commit is contained in:
levlam 2018-12-27 20:46:28 +03:00
parent c252e9ceb5
commit aecbbf47f9
2 changed files with 8 additions and 1 deletions

View File

@ -989,6 +989,12 @@ inline bool operator!=(const PartialLocalFileLocation &lhs, const PartialLocalFi
return !(lhs == rhs);
}
inline StringBuilder &operator<<(StringBuilder &sb, const PartialLocalFileLocation &location) {
return sb << "[partial local location of " << location.file_type_ << " with part size " << location.part_size_
<< " and ready parts " << Bitmask(Bitmask::Decode{}, location.ready_bitmask_) << "] at \"" << location.path_
<< '"';
}
struct FullLocalFileLocation {
FileType file_type_;
string path_;

View File

@ -2313,7 +2313,8 @@ void FileManager::on_partial_download(QueryId query_id, const PartialLocalFileLo
auto file_id = query->file_id_;
auto file_node = get_file_node(file_id);
LOG(DEBUG) << "Receive on_partial_download for file " << file_id;
LOG(DEBUG) << "Receive on_partial_download for file " << file_id << " with " << partial_local
<< ", ready_size = " << ready_size << " and size = " << size;
if (!file_node) {
return;
}