mirror of
https://github.com/apache/druid.git
synced 2025-02-17 07:25:02 +00:00
Autoscaling: Fix case where target < current, but target is too low.
This can happen when workers are provisioned manually.
This commit is contained in:
parent
1407b49da1
commit
48511e15cf
@ -323,14 +323,15 @@ public class SimpleResourceManagementStrategy implements ResourceManagementStrat
|
||||
);
|
||||
}
|
||||
|
||||
final boolean atSteadyState = currentlyProvisioning.isEmpty()
|
||||
&& currentlyTerminating.isEmpty()
|
||||
&& validWorkers.size() == targetWorkerCount;
|
||||
final boolean shouldScaleUp = atSteadyState
|
||||
final boolean notTakingActions = currentlyProvisioning.isEmpty()
|
||||
&& currentlyTerminating.isEmpty();
|
||||
final boolean shouldScaleUp = notTakingActions
|
||||
&& validWorkers.size() >= targetWorkerCount
|
||||
&& targetWorkerCount < maxWorkerCount
|
||||
&& (hasTaskPendingBeyondThreshold(pendingTasks)
|
||||
|| targetWorkerCount < minWorkerCount);
|
||||
final boolean shouldScaleDown = atSteadyState
|
||||
final boolean shouldScaleDown = notTakingActions
|
||||
&& validWorkers.size() == targetWorkerCount
|
||||
&& targetWorkerCount > minWorkerCount
|
||||
&& Iterables.any(validWorkers, isLazyWorker);
|
||||
if (shouldScaleUp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user