pnowojski commented on a change in pull request #17229:
URL: https://github.com/apache/flink/pull/17229#discussion_r739165161



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -523,11 +534,15 @@ protected void 
processInput(MailboxDefaultAction.Controller controller) throws E
         if (!recordWriter.isAvailable()) {
             timer = new 
GaugePeriodTimer(ioMetrics.getBackPressuredTimePerSecond());
             resumeFuture = recordWriter.getAvailableFuture();
-        } else {
+        } else if (!inputProcessor.isAvailable()) {
             timer =
                     new ThroughputPeriodTimer(
                             ioMetrics.getIdleTimeMsPerSecond(), 
throughputCalculator);
             resumeFuture = inputProcessor.getAvailableFuture();
+        } else {
+            // todo: add new metrics (FLINK-23486)
+            timer = new 
GaugePeriodTimer(ioMetrics.getBackPressuredTimePerSecond());
+            resumeFuture = 
changelogWriterAvailabilityProvider.getAvailableFuture();

Review comment:
       I think what you are proposing makes sense and the option (1) would be 
cleaner and in the spirit of unix style cpu usage reporting (where everything 
sums up to 100%). But this would most likely require _some_ Web UI changes:
   
   1. Ideally we would need to find a good way to present the 4th task usage 
time metric. It might be easy, but maybe we will struggle to find a space to do 
it easily.
   2. To limit Web UI changes, at the very least we could have a separate 
metric for network and state backend based backpressure, but somewhere we could 
add up those two values. For example either on the REST API level, or in the 
Web UI itself. (probably in WebUI would be a better option).




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to