rkhachatryan commented on a change in pull request #14526:
URL: https://github.com/apache/flink/pull/14526#discussion_r551444272
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -400,9 +404,23 @@ protected void
processInput(MailboxDefaultAction.Controller controller) throws E
controller.allActionsCompleted();
return;
}
- CompletableFuture<?> jointFuture = getInputOutputJointFuture(status);
- MailboxDefaultAction.Suspension suspendedDefaultAction =
controller.suspendDefaultAction();
- assertNoException(jointFuture.thenRun(suspendedDefaultAction::resume));
+
+ final Suspension suspension = controller.suspendDefaultAction();
Review comment:
I think it can be shortened further by inlining gauges and removing if:
```
assertNoException(inputProcessor.getAvailableFuture()
.thenRun(new ResumeWrapper(
suspension,
recordWriter.isAvailable()
? ioMetrics.getIdleTimeMsPerSecond()
: ioMetrics.getBackPressuredTimePerSecond())));
```
(the gauge is still computed at the time of creation of callback)
WDYT?
----------------------------------------------------------------
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]