devu1997 commented on code in PR #1127:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/1127#discussion_r3368144959


##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/JobVertexScaler.java:
##########
@@ -250,6 +246,11 @@ public ParallelismChange computeScaleTargetParallelism(
             return ParallelismChange.noChange(currentParallelism);
         }
 
+        // Cap target capacity according to the capped scale factor
+        double cappedTargetCapacity =
+                (averageTrueProcessingRate / currentParallelism) * 
newParallelism;

Review Comment:
   This is equivalent to 
   ```
   double cappedTargetCapacity =
                   averageTrueProcessingRate * (newParallelism / 
currentParallelism);
   ```
   
   Since currentParallelism and newParallelism are integers, the scale factor 
would otherwise get rounded (for example, 1.5 would become 1).



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