-
Notifications
You must be signed in to change notification settings - Fork 2k
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 re-wrapping of ByteBuf when sending request body to reactor netty #9934
Fixed re-wrapping of ByteBuf when sending request body to reactor netty #9934
Conversation
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.
LGTM.
@@ -118,8 +117,7 @@ private void configureChannelPipelineHandlers() { | |||
reactorNettyRequest.header(header.name(), header.value()); | |||
} | |||
if (restRequest.body() != null) { | |||
Flux<ByteBuf> nettyByteBufFlux = restRequest.body().map(Unpooled::wrappedBuffer); | |||
return reactorNettyOutbound.send(nettyByteBufFlux); | |||
return reactorNettyOutbound.send(restRequest.body()); |
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.
interesting. we missed this :-)
great finding.
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.
Thanks Mo :)
Thanks to @anuchandy as well for the help so far :)
/azp run cosmos - java - tests |
No pipelines are associated with this pull request. |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
No need to re-wrap the byteBuf as we already wrap it in RxGatewayStoreModel.java while creating request: https://github.com/Azure/azure-sdk-for-java/blob/release/cosmos_v3/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxGatewayStoreModel.java#L147
Addresses this issue: #9802