rkhachatryan commented on a change in pull request #11948:
URL: https://github.com/apache/flink/pull/11948#discussion_r418034387
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
##########
@@ -575,12 +574,10 @@ public void onBuffer(Buffer buffer, int sequenceNumber,
int backlog) throws IOEx
receivedBuffers.add(buffer);
enqueued = true;
- if (listener != null && buffer.isBuffer() &&
receivedCheckpointId < lastRequestedCheckpointId) {
- notifyReceivedBuffer =
buffer.retainBuffer();
Review comment:
IMHO ternary is meant for branches that have only one "effect", usually
assignment. And this is exactly the case here.
`If-else` OTH is meant for cases when "effect" is something more complex.
If the condition is complex, it should be extracted to a method, regardless
of whether it's `if-else` or ternary operator.
Here, I think the condition is fine (and I didn't change it).
----------------------------------------------------------------
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:
[email protected]