Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4533#discussion_r153261175
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/CreditBasedClientHandler.java
 ---
    @@ -152,6 +170,26 @@ public void channelRead(ChannelHandlerContext ctx, 
Object msg) throws Exception
                }
        }
     
    +   @Override
    +   public void userEventTriggered(ChannelHandlerContext ctx, Object msg) 
throws Exception {
    +           if (msg instanceof RemoteInputChannel) {
    +                   boolean triggerWrite = 
inputChannelsWithCredit.isEmpty();
    --- End diff --
    
    how about some small comment as in `PartitionRequestQueue`? Something like
    ```
                        // Queue an input channel for available credits 
announcement.
                        // If the queue is empty, we try to trigger the actual 
write.
                        // Otherwise this will be handled by the
                        // writeAndFlushNextMessageIfPossible calls.
    ```


---

Reply via email to