mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Merge pull request #55666 from ClickHouse/Avogar-patch-1
Fix progress bar for s3 and azure Cluster functions with url without globs
This commit is contained in:
commit
cbdb62d389
@ -847,6 +847,8 @@ StorageAzureBlobSource::GlobIterator::GlobIterator(
|
|||||||
blobs_with_metadata.emplace_back(blob_path_with_globs, object_metadata);
|
blobs_with_metadata.emplace_back(blob_path_with_globs, object_metadata);
|
||||||
if (outer_blobs)
|
if (outer_blobs)
|
||||||
outer_blobs->emplace_back(blobs_with_metadata.back());
|
outer_blobs->emplace_back(blobs_with_metadata.back());
|
||||||
|
if (file_progress_callback)
|
||||||
|
file_progress_callback(FileProgress(0, object_metadata.size_bytes));
|
||||||
is_finished = true;
|
is_finished = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -207,6 +207,16 @@ private:
|
|||||||
{
|
{
|
||||||
auto answer = *buffer_iter;
|
auto answer = *buffer_iter;
|
||||||
++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;
|
return answer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user