Fly-Style commented on code in PR #18958:
URL: https://github.com/apache/druid/pull/18958#discussion_r2735132556


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScalerConfig.java:
##########
@@ -43,11 +43,12 @@
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class CostBasedAutoScalerConfig implements AutoScalerConfig
 {
-  private static final long DEFAULT_SCALE_ACTION_PERIOD_MILLIS = 15 * 60 * 
1000; // 15 minutes
-  private static final long DEFAULT_MIN_TRIGGER_SCALE_ACTION_FREQUENCY_MILLIS 
= 1200000; // 20 minutes
+  private static final long DEFAULT_SCALE_ACTION_PERIOD_MILLIS = 10 * 60 * 
1000; // 10 minutes

Review Comment:
   Fixed: 
https://github.com/apache/druid/pull/18958/commits/688833e86e53d55ae94b82184e4d7188cb4f2e13



##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:
##########
@@ -157,11 +164,17 @@ public int computeTaskCountForScaleAction()
     final int optimalTaskCount = computeOptimalTaskCount(lastKnownMetrics);
     final int currentTaskCount = lastKnownMetrics.getCurrentTaskCount();
 
-    // Perform only scale-up actions
+    // Perform scale-up actions; scale-down actions only if configured.
     int taskCount = -1;
     if (optimalTaskCount > currentTaskCount) {
       taskCount = optimalTaskCount;
-      log.info("New task count [%d] on supervisor [%s]", taskCount, 
supervisorId);
+      scaleDownCounter = 0; // Nullify the scaleDown counter after a 
successful scaleup too.
+      log.info("New task count [%d] on supervisor [%s], scaling up", 
taskCount, supervisorId);
+    } else if (!config.isScaleDownOnTaskRolloverOnly() && optimalTaskCount < 
currentTaskCount &&
+               (config.getScaleDownBarrier() == 0 || ++scaleDownCounter == 
config.getScaleDownBarrier())) {

Review Comment:
   Fixed: 
https://github.com/apache/druid/pull/18958/commits/688833e86e53d55ae94b82184e4d7188cb4f2e13



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to