amaliujia commented on a change in pull request #230:
URL: https://github.com/apache/incubator-ratis/pull/230#discussion_r509927843
##########
File path:
ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -199,25 +207,45 @@ public void channelRead(ChannelHandlerContext ctx, Object
msg) throws IOExceptio
// do not need to forward header request
final List<DataStreamOutput> outs = proxies.getDataStreamOutput();
peersStreamOutput.put(request.getStreamId(), outs);
- for(DataStreamOutput out : outs) {
+ for (DataStreamOutput out : outs) {
remoteWrites.add(out.getHeaderFuture());
}
} else {
// body
- for(DataStreamOutput out :
peersStreamOutput.get(request.getStreamId())) {
+ for (DataStreamOutput out :
peersStreamOutput.get(request.getStreamId())) {
remoteWrites.add(out.writeAsync(request.slice().nioBuffer()));
}
}
JavaUtils.allOf(remoteWrites).thenCombine(localWrite, (v,
bytesWritten) -> {
buf.release();
- sendReply(request, bytesWritten, ctx);
Review comment:
I see. Updated. Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]