maytasm commented on a change in pull request #11440:
URL: https://github.com/apache/druid/pull/11440#discussion_r669335938



##########
File path: 
indexing-service/src/main/java/org/apache/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerProvisioningStrategy.java
##########
@@ -246,13 +246,16 @@ private int getScaleUpNodeCount(
       log.info("Min/max workers: %d/%d", minWorkerCount, maxWorkerCount);
       final int currValidWorkers = getCurrValidWorkers(workers);
 
-      // If there are no worker, spin up minWorkerCount, we cannot determine 
the exact capacity here to fulfill the need
-      // since we are not aware of the expectedWorkerCapacity.
-      int moreWorkersNeeded = currValidWorkers == 0 ? minWorkerCount : 
getWorkersNeededToAssignTasks(
+      // If there are no worker and workerCapacityFallback config is not set 
(-1) or invalid (<= 0), then spin up minWorkerCount
+      // as we cannot determine the exact capacity here to fulfill the need.
+      // However, if there are no worker but workerCapacityFallback config is 
set (>0), then we can
+      // determine the number of workers needed using workerCapacityFallback 
config as expected worker capacity
+      int moreWorkersNeeded = currValidWorkers == 0 && 
config.getWorkerCapacityFallback() <= 0 ? minWorkerCount : 
getWorkersNeededToAssignTasks(

Review comment:
       Done




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