zhuzhurk commented on code in PR #21695:
URL: https://github.com/apache/flink/pull/21695#discussion_r1083402474


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/slowtaskdetector/ExecutionTimeBasedSlowTaskDetector.java:
##########
@@ -219,7 +220,8 @@ private List<ExecutionAttemptID> 
findExecutionsExceedingBaseline(
                             ExecutionTimeWithInputBytes timeWithBytes =
                                     getExecutionTimeAndInputBytes(e, 
currentTimeMillis);
                             return timeWithBytes.getExecutionTime() >= 
baselineLowerBoundMillis
-                                    && timeWithBytes.compareTo(baseline) >= 0;
+                                    && (baseline.getExecutionTime() == 0

Review Comment:
   I think it's better to move this check into the `compareTo`, and add some 
comments to explain that when `baselineRatio` is 0, we have to generate a 
baseline of 0 execution time. In order it can be compared to an execution time 
with a valid bytes, and also compared an execution time with an unknown bytes, 
we do not require bytes to be both valid or both unknown in the comparison if 
the execution time is 0.
   
   This helps others to understand this logic.



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