-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed an issue in S3 client where a GetObject request m… #5977
Conversation
09c6ef5
to
4f0e173
Compare
4f0e173
to
023f74c
Compare
…ay hang if streaming failed mid request
023f74c
to
ae30c8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my understanding, why are we changing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was automatically updated after I ran mvn package. It basically means the suppressions are no longer needed. It could be that we fixed the violations or simply removed the code that had the violations
@@ -48,7 +48,8 @@ public class CodingConventionWithSuppressionTest { | |||
private static final Set<Pattern> ALLOWED_WARN_LOG_SUPPRESSION = new HashSet<>( | |||
Arrays.asList(ArchUtils.classNameToPattern(EmfMetricLoggingPublisher.class), | |||
ArchUtils.classNameToPattern(MetricEmfConverter.class), | |||
ArchUtils.classNameToPattern(MakeHttpRequestStage.class))); | |||
ArchUtils.classNameToPattern(MakeHttpRequestStage.class), | |||
ArchUtils.classNameToPattern("software.amazon.awssdk.services.s3.internal.crt.S3CrtResponseHandlerAdapter"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing S3CrtResponseHandlerAdapter.class
does not work because it'd try to load CRT classes and fail and we don't want to include CRT dependency in our arch tests
|
…ay hang if streaming failed mid request
Motivation and Context
May be related to #5755
Modifications
Fixed an issue in AWS CRT-based S3 client where a GetObject request may hang if streaming failed mid request.
In the AWS CRT-based S3 client, if there is an I/O error thrown, we notify the response handler through
responseHandler#onError
. WhenAsyncResponseTransformer#toBlockingInputStream
is used, it just completed the future exceptionally and doesn't send error to the underlying subscriberhttps://github.com/aws/aws-sdk-java-v2/blob/master/core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/async/InputStreamResponseTransformer.java#L60
Testing
Added unit tests and verified through smoke tests (turning off wifi mid streaming to simulate the error)
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License