pnowojski commented on a change in pull request #12706: URL: https://github.com/apache/flink/pull/12706#discussion_r442758341
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java ########## @@ -170,7 +170,7 @@ void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException { @Override Optional<BufferAndAvailability> getNextBuffer() throws IOException { checkError(); - checkState(partitionRequestClient != null, "Queried for a buffer before requesting a queue."); + checkState(partitionRequestClient != null, "Queried for a buffer before requesting a subpartition."); Review comment: nit: If you are planning to keep this commit as an independent one and not be squashed with the bugfix, could you change it's commit message from: > optimize error message to: > [FLINK-18348][hotfix] Improve error messages in RemoteInputChannel ? I'm also fine with squashing it - as you prefer. ########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java ########## @@ -169,9 +169,8 @@ void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException { @Override Optional<BufferAndAvailability> getNextBuffer() throws IOException { - checkState(partitionRequestClient != null, "Queried for a buffer before requesting a queue."); - checkError(); + checkState(partitionRequestClient != null, "Queried for a buffer before requesting a queue."); Review comment: I think you are right, that it should be fine for now, but as you wrote: > But it's also reasonable to add this additional check and bind them together because we may introduce other changes that cause this in the future. it's probably better to future proof those checks and bind them together. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org