Skip to content
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

Conversation

kushagraThapar
Copy link
Member

@kushagraThapar kushagraThapar commented Apr 7, 2020

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

@kushagraThapar kushagraThapar requested a review from moderakh as a code owner April 7, 2020 21:26
Copy link
Contributor

@moderakh moderakh left a 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());
Copy link
Contributor

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.

Copy link
Member Author

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 :)

@kushagraThapar
Copy link
Member Author

/azp run cosmos - java - tests

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@kushagraThapar
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kushagraThapar
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kushagraThapar
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kushagraThapar kushagraThapar merged commit f6f3b8f into Azure:release/cosmos_v3 Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants