mirror of
https://github.com/apache/druid.git
synced 2025-02-09 03:24:55 +00:00
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…
x
Reference in New Issue
Block a user