You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "gyfora (via GitHub)" <gi...@apache.org> on 2023/03/29 09:03:54 UTC

[GitHub] [flink-kubernetes-operator] gyfora commented on a diff in pull request #556: [FLINK-30575] Set processing capacity to infinite if task is idle

gyfora commented on code in PR #556:
URL: https://github.com/apache/flink-kubernetes-operator/pull/556#discussion_r1151617424


##########
flink-kubernetes-operator-autoscaler/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/metrics/ScalingMetrics.java:
##########
@@ -38,10 +38,12 @@ public class ScalingMetrics {
     private static final Logger LOG = LoggerFactory.getLogger(ScalingMetrics.class);
 
     /**
-     * The minimum value to avoid using zero values which cause side effects like division by zero
-     * or out of bounds (infinitive) floats.
+     * A large, effectively infinite value which continues to allow arithmetics for the scaling
+     * algorithm. It is used in case the task is not processing data or is completely idle. We can't
+     * accurately sample its true processing rate in this case and assume a high capacity until we
+     * know any better. This is to allow scale down in case a task becomes completely idle.
      */
-    public static final double EFFECTIVELY_ZERO = 1e-10;
+    public static final double EFFECTIVELY_INFINITE = 1e100;

Review Comment:
   Any reason for not actually using `Double.POSITIVE_INFINITY`? 



-- 
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-unsubscribe@flink.apache.org

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