Update Metadata.cpp

This commit is contained in:
Kseniia Sumarokova 2024-11-08 16:31:58 +01:00 committed by GitHub
parent 00e1c5cf0b
commit e18ff6e56b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -717,7 +717,7 @@ void CacheMetadata::downloadImpl(FileSegment & file_segment, std::optional<Memor
if (downloaded_size >= max_file_segment_size)
break;
if (download_max_file_segment_size + size > max_file_segment_size)
if (downloaded_size + size > max_file_segment_size)
{
/// Do not download more than download_max_file_segment_size
/// because we want to leave right boundary of file segment aligned.