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



##########
File path: 
extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceAutoScaler.java
##########
@@ -80,8 +80,8 @@ public GceAutoScaler(
           @JsonProperty("envConfig") GceEnvironmentConfig envConfig
   )
   {
-    Preconditions.checkArgument(minNumWorkers > 0,
-                                "minNumWorkers must be greater than 0");
+    Preconditions.checkArgument(minNumWorkers >= 0,

Review comment:
       The PendingTaskBasedWorkerProvisioningStrategy gets created once at 
startup which at that time may not have an auto scaler configured or if auto 
scaler was configured the minWorkerCount can change later. This is because the 
auto scaler along with the minWorkerCount can be configured dynamically after 
the cluster is already up and running. Hence, if the check is in the 
constructor of PendingTaskBasedWorkerProvisioningStrategy , then we can miss 
the cases I mentioned above. I think it is better to have the check in 
PendingTaskBasedWorkerProvisioningStrategy#getDefaultWorkerBehaviorConfig which 
is every time we do terminate/provision, etc. 




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