Dennis-Mircea commented on PR #1134:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/1134#issuecomment-4679441544
> Yes, this is actually addressing prod issue we encountered. If you are
asking for steps is can try to create a simple case.
Thanks, I believe you hit a real `NumberFormatException` in prod. My point
is that the value triggering it is `+Infinity`, not `0`.
An idle vertex doesn't report `TRUE_PROCESSING_RATE = 0.0`. In
`ScalingMetricEvaluator.computeTprFromBusyTime`, `rate == 0` returns
`Double.POSITIVE_INFINITY` ("nothing coming in, assume infinite processing
power"), and the observed-TPR path does the same. So `baselineProcessingRate`
becomes `+Infinity`, not `0`.
With that, your current guard doesn't catch it:
- `denominator = squaredSum * (+Infinity) = +Infinity`, so `denominator ==
0.0` is false.
- the loop only skips `NaN`, not `Infinity`, so `sum` becomes `+Infinity`
too.
- `alpha = +Infinity / +Infinity = NaN`, which `Math.max/Math.min` don't
sanitize, so `BigDecimal.valueOf(NaN)` still throws.
So this patch would not fix the prod crash. The fix needs to handle
non-finite values. Either guard the result (`if (!Double.isFinite(alpha))
return 1.0;`), or drop non-finite observations from the fit
(`!Double.isFinite(...)` instead of `isNaN(...)` for both
`baselineProcessingRate` and each `processingRate`).
--
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]