mxm commented on code in PR #847:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/847#discussion_r1667340462
##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/JobVertexScaler.java:
##########
@@ -95,13 +106,23 @@ public int computeScaleTargetParallelism(
LOG.warn(
"Target data rate is not available for {}, cannot compute
new parallelism",
vertex);
- return currentParallelism;
+ return VertexScalingResult.normalScaling(currentParallelism);
}
+ targetCapacity *= backpropagationScaleFactor;
+
LOG.debug("Target processing capacity for {} is {}", vertex,
targetCapacity);
double scaleFactor = targetCapacity / averageTrueProcessingRate;
- double minScaleFactor = 1 - conf.get(MAX_SCALE_DOWN_FACTOR);
double maxScaleFactor = 1 + conf.get(MAX_SCALE_UP_FACTOR);
+ double minScaleFactor = 1 - conf.get(MAX_SCALE_DOWN_FACTOR);
+
+ // if bottleneck propagation is applied and scaling down is forbidden,
limit minScaleFactor
+ // with 1
+ if (backpropagationScaleFactor < 1.0
+ &&
!conf.getBoolean(BOTTLENECK_PROPAGATION_SCALE_DOWN_ENABLED)) {
+ minScaleFactor = 1.0;
+ }
Review Comment:
Correct, I reversed min/max because I didn't yet know how the factor worked.
--
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]