maytasm commented on a change in pull request #11440:
URL: https://github.com/apache/druid/pull/11440#discussion_r669083177
##########
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:
Having user set the config to 1 and the default value being 1 should not
be the same due to
https://github.com/apache/druid/pull/11440/files#diff-86276fbfe645ed104be05c850062fdb8e89fce43c656e41725c1e6d6ed671c25R253
If you have no worker and the new config NOT SET then you do the current
behavior which is scale to minNumWorkers (this basically disregard capacity and
pending tasks you have)
if you have no worker and the new config SET (i.e. set to 1) then you use
that value to determine how many worker of said capacity needed to process the
pending tasks you have...which may not be the same as the configured
minNumWorkers
--
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]