amaliujia commented on a change in pull request #213:
URL: https://github.com/apache/incubator-ratis/pull/213#discussion_r507456225



##########
File path: 
ratis-client/src/main/java/org/apache/ratis/client/DataStreamClient.java
##########
@@ -50,6 +53,10 @@
 
     private Builder() {}
 
+    public static Builder newBuilder() {

Review comment:
       done.

##########
File path: 
ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -115,10 +135,30 @@ private ChannelInboundHandler getServerHandler(){
       public void channelRead(ChannelHandlerContext ctx, Object msg) {
         final DataStreamRequestByteBuf request = (DataStreamRequestByteBuf)msg;
         final ByteBuf buf = request.slice();
-        final AtomicBoolean released = new AtomicBoolean();
-        streams.computeIfAbsent(request.getStreamId(), id -> 
getDataStreamFuture(buf, released))
-            .thenApply(stream -> writeTo(buf, stream, released.get()))
-            .thenAccept(byteWritten -> sendReply(request, byteWritten, ctx));
+        final AtomicBoolean shouldRelease = new AtomicBoolean();

Review comment:
       removed.




----------------------------------------------------------------
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]


Reply via email to