diff --git a/server/src/main/java/io/druid/server/coordinator/CoordinatorDynamicConfig.java b/server/src/main/java/io/druid/server/coordinator/CoordinatorDynamicConfig.java index 20cd594199e..395646ad0c2 100644 --- a/server/src/main/java/io/druid/server/coordinator/CoordinatorDynamicConfig.java +++ b/server/src/main/java/io/druid/server/coordinator/CoordinatorDynamicConfig.java @@ -53,7 +53,10 @@ public class CoordinatorDynamicConfig this.replicantLifetime = replicantLifetime; this.replicationThrottleLimit = replicationThrottleLimit; this.emitBalancingStats = emitBalancingStats; - this.balancerComputeThreads = Math.min(balancerComputeThreads, Runtime.getRuntime().availableProcessors() - 1); + this.balancerComputeThreads = Math.min( + Math.max(balancerComputeThreads, 1), + Runtime.getRuntime().availableProcessors() - 1 + ); } @JsonProperty