This PR modifies the behavior of @aws-sdk/lib-storage's Upload class' leavePartsOnError: boolean to do what it sounds like it does instead of something meaningless.
Previous to this PR:
when true, any error encountered during MPU would be thrown
when false, any error encountered during MPU would be ignored
default was false
As of this PR:
when true, AbortMultipartUpload is not called in the event of a failed MPU
when false, AbortMultipartUpload is called in the event of a failed MPU to mark the parts for cleanup as recommended by S3
default is still false
Testing
new e2e test
Additional context
Portion of docs from AWS SDK JSv2:
* ## Handling Multipart Cleanup
*
* By default, this class will automatically clean up any multipart uploads
* when an individual part upload fails. This behavior can be disabled in order
* to manually handle failures by setting the `leavePartsOnError` configuration
* option to `true` when initializing the upload object.
behavior (JSv2 source code):
if (self.service.config.params.UploadId && !self.leavePartsOnError) {
self.service.abortMultipartUpload().send();
} else if (self.leavePartsOnError) {
self.isDoneChunking = false;
}
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Issue
related to https://github.com/aws/aws-sdk-js-v3/pull/4414
Description
This PR modifies the behavior of
@aws-sdk/lib-storage
'sUpload
class'leavePartsOnError: boolean
to do what it sounds like it does instead of something meaningless.Previous to this PR:
As of this PR:
Testing
new e2e test
Additional context
Portion of docs from AWS SDK JSv2:
behavior (JSv2 source code):
This behavior appears to have been lost in https://github.com/aws/aws-sdk-js-v3/pull/2039
Checklist