1996fanrui commented on code in PR #774:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/774#discussion_r1490305805


##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/JobAutoScalerImpl.java:
##########
@@ -171,7 +171,7 @@ private void runScalingLogic(Context ctx, 
AutoscalerFlinkMetrics autoscalerMetri
             stateStore.storeScalingTracking(ctx, scalingTracking);
         }
 
-        if (collectedMetrics.getMetricHistory().isEmpty()) {
+        if (collectedMetrics.getMetricHistory().size() < 2) {

Review Comment:
   Would you mind adding a simple comment to explain why we call the scaling 
logic when metric history size >= 2?
   
   It may be helpful to let new developers to understand these 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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to