gyfora commented on code in PR #617:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/617#discussion_r1224032811
##########
flink-kubernetes-operator-autoscaler/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/JobAutoScalerImpl.java:
##########
@@ -102,10 +108,8 @@ public boolean scale(FlinkResourceContext<? extends
AbstractFlinkResource<?, ?>>
resource, autoScalerInfo, ctx.getFlinkService(),
conf);
LOG.debug("Evaluating scaling metrics for {}", collectedMetrics);
- var evaluatedMetrics = evaluator.evaluate(conf, collectedMetrics);
+ evaluatedMetrics = evaluator.evaluate(conf, collectedMetrics);
LOG.debug("Scaling metrics evaluated: {}", evaluatedMetrics);
- lastEvaluatedMetrics.put(resourceId, evaluatedMetrics);
- flinkMetrics.registerScalingMetrics(() ->
lastEvaluatedMetrics.get(resourceId));
if (!collectedMetrics.isFullyCollected()) {
// We have done an upfront evaluation, but we are not ready
for scaling.
Review Comment:
My point was that you cannot simply `null` them out here because that may
interfere with how the metrics are initialized.
--
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]