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

    https://github.com/apache/flink/pull/4533#discussion_r154009420
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyMessage.java
 ---
    @@ -584,4 +587,60 @@ static CloseRequest 
readFrom(@SuppressWarnings("unused") ByteBuf buffer) throws
                        return new CloseRequest();
                }
        }
    +
    +   static class AddCredit extends NettyMessage {
    +
    +           private static final byte ID = 6;
    +
    +           final ResultPartitionID partitionId;
    +
    +           final int credit;
    +
    +           final InputChannelID receiverId;
    +
    +           AddCredit(ResultPartitionID partitionId, int credit, 
InputChannelID receiverId) {
    +                   this.partitionId = partitionId;
    +                   this.credit = credit;
    --- End diff --
    
    I think it should be `checkArgument(credit > 0)`?
    I will add this check in `AddCredit` here and the `PartitionRequest` will 
be added in the last PR to avoid temporary value 0, what do you think?


---

Reply via email to