adoroszlai commented on code in PR #977:
URL: https://github.com/apache/ratis/pull/977#discussion_r1412871372


##########
ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientStreamRpc.java:
##########
@@ -260,6 +266,8 @@ synchronized boolean write(DataStreamRequest request) {
 
     synchronized boolean shouldFlush(boolean force, int countMin, SizeInBytes 
bytesMin) {
       if (force || count >= countMin || bytes >= bytesMin.getSize()) {
+        LOG.debug("flush: force? {}, (count, bytes)=({}, {}), min=({}, {})",
+            force, count, bytes, countMin, bytesMin);

Review Comment:
   @szetszwo After I fixed `shouldFlush` (slightly differently, but I think the 
result is the same), I got 
[failures](https://github.com/adoroszlai/ratis/actions/runs/7069285491/job/19244978160#step:5:671)
 in `TestNettyDataStreamChainTopologyWithGrpcCluster` and 
`TestNettyDataStreamStarTopologyWithGrpcCluster`.  I guess the problem happens 
if `close()` is called without sending anything.  See my [previous 
comment](https://github.com/apache/ratis/pull/977#discussion_r1412783939) on 
how I fixed these tests.



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