symious commented on code in PR #1179:
URL: https://github.com/apache/ratis/pull/1179#discussion_r1860366444


##########
ratis-netty/src/main/java/org/apache/ratis/netty/server/DataStreamManagement.java:
##########
@@ -459,7 +461,11 @@ private void readImpl(DataStreamRequestByteBuf request, 
ChannelHandlerContext ct
       localWrite = CompletableFuture.completedFuture(0L);
       remoteWrites = Collections.emptyList();
     } else if (request.getType() == Type.STREAM_DATA) {
-      localWrite = info.getLocal().write(request.slice(), 
request.getWriteOptionList(), writeExecutor);
+      if (close && request.getDataLength() == 0) {
+        localWrite = CompletableFuture.completedFuture(0L);
+      } else {
+        localWrite = info.getLocal().write(request.slice(), 
request.getWriteOptionList(), writeExecutor);
+      }

Review Comment:
   And the length check here, maybe we can remove it? since it will always get 
into here. 
https://github.com/apache/ratis/blob/master/ratis-netty/src/main/java/org/apache/ratis/netty/server/DataStreamManagement.java#L322



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to