Fix progress bar for s3 and azure Cluster functions with url without globs

This commit is contained in:
Kruglov Pavel 2023-10-16 12:38:10 +02:00 committed by GitHub
parent 8449e4c7b7
commit 836e35b6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,6 +207,16 @@ private:
{
auto answer = *buffer_iter;
++buffer_iter;
/// If url doesn't contain globs, we didn't list s3 bucket and didn't get object info for the key.
/// So we get object info lazily here on 'next()' request.
if (!answer.info)
{
answer.info = S3::getObjectInfo(*client, globbed_uri.bucket, answer.key, globbed_uri.version_id, request_settings);
if (file_progress_callback)
file_progress_callback(FileProgress(0, answer.info->size));
}
return answer;
}