Skip to content

Fixed an issue where streaming writes could be misordered. #1967

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

Merged
merged 2 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-AmazonS3-8e7768a.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "Amazon S3",
"description": "Fixed an issue that could cause \"Data read has a different checksum than expected\" errors."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "Netty NIO HTTP Client",
"description": "Fixed an issue where, under rare circumstances, streaming request bytes could be misordered."
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.util.AttributeKey;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.SdkInternalApi;

Expand All @@ -30,18 +29,11 @@
*/
@SdkInternalApi
public class OrderedWriteChannelHandlerContext extends DelegatingChannelHandlerContext {
private static final AttributeKey<Void> ORDERED =
NettyUtils.getOrCreateAttributeKey("aws.http.nio.netty.async.OrderedWriteChannelHandlerContext.ORDERED");

private OrderedWriteChannelHandlerContext(ChannelHandlerContext delegate) {
super(delegate);
delegate.channel().attr(ORDERED).set(null);
}

public static ChannelHandlerContext wrap(ChannelHandlerContext ctx) {
if (ctx.channel().hasAttr(ORDERED)) {
return ctx;
}
return new OrderedWriteChannelHandlerContext(ctx);
}

Expand Down

This file was deleted.