Yang LI created FLINK-33966: ------------------------------- Summary: Fix the getNumRecordsInPerSecond Utility Function Key: FLINK-33966 URL: https://issues.apache.org/jira/browse/FLINK-33966 Project: Flink Issue Type: Bug Components: Autoscaler Affects Versions: kubernetes-operator-1.7.0 Reporter: Yang LI
We have 2 times the same condition check in the function getNumRecordsInPerSecond ([L220|https://github.com/apache/flink-kubernetes-operator/blob/main/flink-autoscaler/src/main/java/org/apache/flink/autoscaler/metrics/ScalingMetrics.java#L220] and [L224|https://github.com/apache/flink-kubernetes-operator/blob/main/flink-autoscaler/src/main/java/org/apache/flink/autoscaler/metrics/ScalingMetrics.java#L224]) Action: Update getNumRecordsInPerSecond'{{{}s{}}} second {{if}} condition from {{if (isSource && ...)}} to {{{}if (!isSource && ...){}}}. This addresses the redundant check and ensures correct metric fetching for non-source operators. -- This message was sent by Atlassian Jira (v8.20.10#820010)