szetszwo commented on code in PR #977:
URL: https://github.com/apache/ratis/pull/977#discussion_r1412901644
##########
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:
@adoroszlai , Oops, I was mixing up stream close
(`StandardWriteOption.CLOSE`) and connection close
`NettyClientStreamRpc.close()`. When there is nothing to send, it should flush
for stream close but not connection close.
BTW, the `MemoizedSupplier` is a good catch. 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]