Merge pull request #21954 from ucasFL/s3-log

Fix misleading log in WriteBufferFromS3
This commit is contained in:
alexey-milovidov 2021-03-22 23:22:44 +03:00 committed by GitHub
commit 231c7266ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,7 +159,8 @@ void WriteBufferFromS3::writePart()
auto outcome = client_ptr->UploadPart(req); auto outcome = client_ptr->UploadPart(req);
LOG_TRACE(log, "Writing part. Bucket: {}, Key: {}, Upload_id: {}, Data size: {}", bucket, key, multipart_upload_id, temporary_buffer->tellp()); LOG_TRACE(
log, "Writing part. Bucket: {}, Key: {}, Upload_id: {}, Data size: {}", bucket, key, multipart_upload_id, req.GetContentLength());
if (outcome.IsSuccess()) if (outcome.IsSuccess())
{ {
@ -215,7 +216,7 @@ void WriteBufferFromS3::makeSinglepartUpload()
auto outcome = client_ptr->PutObject(req); auto outcome = client_ptr->PutObject(req);
if (outcome.IsSuccess()) if (outcome.IsSuccess())
LOG_DEBUG(log, "Single part upload has completed. Bucket: {}, Key: {}", bucket, key); LOG_DEBUG(log, "Single part upload has completed. Bucket: {}, Key: {}, Object size: {}", bucket, key, req.GetContentLength());
else else
throw Exception(outcome.GetError().GetMessage(), ErrorCodes::S3_ERROR); throw Exception(outcome.GetError().GetMessage(), ErrorCodes::S3_ERROR);
} }