mirror of https://github.com/apache/druid.git
Improve cache cost to handle heterogenous historicals (#5416)
This commit is contained in:
parent
e9977ce4ef
commit
ac5034e241
|
@ -61,7 +61,11 @@ public class CachingCostBalancerStrategy extends CostBalancerStrategy
|
|||
// add segments that will be loaded to the cost
|
||||
cost += costCacheForLoadingSegments(server).computeCost(serverName, proposalSegment);
|
||||
|
||||
return cost;
|
||||
if (server.getAvailableSize() <= 0) {
|
||||
return Double.POSITIVE_INFINITY;
|
||||
}
|
||||
|
||||
return cost * (server.getMaxSize() / server.getAvailableSize());
|
||||
}
|
||||
|
||||
private ClusterCostCache costCacheForLoadingSegments(ServerHolder server)
|
||||
|
|
Loading…
Reference in New Issue