davsclaus commented on code in PR #14062:
URL: https://github.com/apache/camel/pull/14062#discussion_r1591276739
##########
components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java:
##########
@@ -244,29 +262,41 @@ private CompleteMultipartUploadResponse
completeUpload(UploadState state) {
.uploadId(state.initResponse.uploadId())
.build();
- CompleteMultipartUploadResponse uploadResult =
getEndpoint().getS3Client().completeMultipartUpload(compRequest);
+ try {
+ final CompleteMultipartUploadResponse uploadResult
+ =
getEndpoint().getS3Client().completeMultipartUpload(compRequest);
- // Converting the index to String can cause extra overhead
- if (LOG.isInfoEnabled()) {
- LOG.info("Completed upload for the part {} with etag {} at index
{}", part, uploadResult.eTag(),
- state.index);
+ // Converting the index to String can cause extra overhead
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Completed upload for the part {}, multipart {} with
etag {} at index {}", part, state.multipartIndex,
+ uploadResult.eTag(),
+ state.index);
+ }
+ part.getAndIncrement();
+ return uploadResult;
+ } catch (Exception e) {
+ LOG.error("Error completing multipart updload");
Review Comment:
Change to WARN and we likely need to include the caused exception so the
user has a chance to understand why it failed. Also adjust the message to say
that the upload will be aborted.
##########
components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java:
##########
@@ -244,29 +262,41 @@ private CompleteMultipartUploadResponse
completeUpload(UploadState state) {
.uploadId(state.initResponse.uploadId())
.build();
- CompleteMultipartUploadResponse uploadResult =
getEndpoint().getS3Client().completeMultipartUpload(compRequest);
+ try {
+ final CompleteMultipartUploadResponse uploadResult
+ =
getEndpoint().getS3Client().completeMultipartUpload(compRequest);
- // Converting the index to String can cause extra overhead
- if (LOG.isInfoEnabled()) {
- LOG.info("Completed upload for the part {} with etag {} at index
{}", part, uploadResult.eTag(),
- state.index);
+ // Converting the index to String can cause extra overhead
+ if (LOG.isInfoEnabled()) {
Review Comment:
Change to DEBUG logging
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]