mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fix multipart upload for large S3 object
This commit is contained in:
parent
41d405476a
commit
d6ca97c8d0
@ -166,7 +166,8 @@ void BackupWriterS3::copyObjectImpl(
|
|||||||
|
|
||||||
auto outcome = client->CopyObject(request);
|
auto outcome = client->CopyObject(request);
|
||||||
|
|
||||||
if (!outcome.IsSuccess() && outcome.GetError().GetExceptionName() == "EntityTooLarge")
|
if (!outcome.IsSuccess() && (outcome.GetError().GetExceptionName() == "EntityTooLarge"
|
||||||
|
|| outcome.GetError().GetExceptionName() == "InvalidRequest"))
|
||||||
{ // Can't come here with MinIO, MinIO allows single part upload for large objects.
|
{ // Can't come here with MinIO, MinIO allows single part upload for large objects.
|
||||||
copyObjectMultipartImpl(src_bucket, src_key, dst_bucket, dst_key, head, metadata);
|
copyObjectMultipartImpl(src_bucket, src_key, dst_bucket, dst_key, head, metadata);
|
||||||
return;
|
return;
|
||||||
|
@ -480,7 +480,8 @@ void S3ObjectStorage::copyObjectImpl(
|
|||||||
|
|
||||||
auto outcome = client_ptr->CopyObject(request);
|
auto outcome = client_ptr->CopyObject(request);
|
||||||
|
|
||||||
if (!outcome.IsSuccess() && outcome.GetError().GetExceptionName() == "EntityTooLarge")
|
if (!outcome.IsSuccess() && (outcome.GetError().GetExceptionName() == "EntityTooLarge"
|
||||||
|
|| outcome.GetError().GetExceptionName() == "InvalidRequest"))
|
||||||
{ // Can't come here with MinIO, MinIO allows single part upload for large objects.
|
{ // Can't come here with MinIO, MinIO allows single part upload for large objects.
|
||||||
copyObjectMultipartImpl(src_bucket, src_key, dst_bucket, dst_key, head, metadata);
|
copyObjectMultipartImpl(src_bucket, src_key, dst_bucket, dst_key, head, metadata);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user