mxm commented on code in PR #721:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/721#discussion_r1412183304


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/AbstractFlinkResourceReconciler.java:
##########
@@ -180,13 +190,28 @@ public void reconcile(FlinkResourceContext<CR> ctx) 
throws Exception {
         }
     }
 
-    private void applyAutoscaler(FlinkResourceContext<CR> ctx) throws 
Exception {
+    private void applyAutoscaler(FlinkResourceContext<CR> ctx, @Nullable 
String existingOverrides)
+            throws Exception {
         var autoScalerCtx = ctx.getJobAutoScalerContext();
         boolean autoscalerEnabled =
                 ctx.getResource().getSpec().getJob() != null
                         && 
ctx.getObserveConfig().getBoolean(AUTOSCALER_ENABLED);
         autoScalerCtx.getConfiguration().set(AUTOSCALER_ENABLED, 
autoscalerEnabled);
+
         autoscaler.scale(autoScalerCtx);

Review Comment:
   This call to scale can still lead to a spec change, even with the code 
below. It just prevents spec changes related to a non-deterministic ordering of 
the parallelism overrides, e.g. `a:1,b2` and `b:2,a:1`. I think it is a good 
idea to add documentation on how the reconciliation loop works, but it doesn't 
feel directly related to the changes here. There is a comment in line 211 which 
states that we avoid changing the spec. I can try to expand a little more.



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

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

Reply via email to