suneet-s commented on a change in pull request #11440:
URL: https://github.com/apache/druid/pull/11440#discussion_r669072520
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerProvisioningStrategy.java
##########
@@ -441,12 +445,18 @@ private int
getCurrValidWorkers(Collection<ImmutableWorkerInfo> workers)
return currValidWorkers;
}
- private static int getExpectedWorkerCapacity(final
Collection<ImmutableWorkerInfo> workers)
+ private static int getExpectedWorkerCapacity(final
Collection<ImmutableWorkerInfo> workers, final Integer workerCapacityFallback)
{
int size = workers.size();
if (size == 0) {
- // No existing workers assume capacity per worker as 1
- return 1;
+ // No existing workers
+ if (workerCapacityFallback != null) {
+ // Return workerCapacityFallback if it is set in config
+ return workerCapacityFallback;
+ } else {
+ // Assume capacity per worker as 1
+ return 1;
+ }
Review comment:
Based on this function I don't think you need to detect the case where
`workerCapacityFallback` is unset. You can simply set the default value to 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]