swatiksi273-ksolves opened a new pull request, #1136:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1136

   ## What is the purpose of the change
   The `computeEdgeOutputRatio` method in `ScalingMetricEvaluator` was 
returning `0.0` 
   when input metrics were temporarily unavailable, instead of `Double.NaN`. 
This caused 
   the autoscaler to treat zero as valid throughput data, driving 
`TARGET_DATA_RATE` to 
   zero and triggering incorrect scale down even when the job was busy 
(FLINK-39925).
   
   ## Brief change log
     - Return `Double.NaN` when `inputRate` is NaN (metrics temporarily 
unavailable)
     - Return `0.0` only when `inputRate` is genuinely zero (valid data)
     - Return `Double.NaN` when `outputRate` is NaN (metrics temporarily 
unavailable)
     - NaN propagates safely up the call chain, causing autoscaler to skip 
scaling decisions
   
   ## Verifying this change
   This change is already covered by existing tests, such as 
`ScalingMetricEvaluatorTest` 
   (14 tests pass) and `ScalingMetricCollectorTest` (8 tests pass).
   
   ## Does this pull request potentially affect one of the following parts:
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: 
no
     - Core observer or reconciler logic that is regularly executed: yes
   
   ## Documentation
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable


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