echauchot commented on code in PR #22985: URL: https://github.com/apache/flink/pull/22985#discussion_r1307106011
########## flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/Executing.java: ########## @@ -144,6 +188,17 @@ private void maybeRescale() { } } + private Duration timeSinceLastRescale() { + return Duration.between(lastRescale, Instant.now()); + } + + private void rescaleWhenCooldownPeriodIsOver() { + context.runIfConditionOrSchedule( + timeSinceLastRescale().compareTo(scalingIntervalMin) > 0, + this::maybeRescale, + scalingIntervalMin); // reset cooldown period Review Comment: That is right. My first implementation scheduled ad 08:01:35 but @dmvk suggested [here](https://lists.apache.org/thread/m2w2xzfjpxlw63j0k7tfxfgs0rshhwwr) that we keep the min interval low but we restart the cooldown period each time. That is what is expressed in the FLIP -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org