The costs of segments that are marked to be dropped in CostBalancerStrategy shoud be computed
Affected Version
0.12.3/0.19.0
Description
// plus the costs of segments that will be loaded
cost += computeJointSegmentsCost(proposalSegment, server.getPeon().getSegmentsToLoad());
// minus the costs of segments that are marked to be dropped
cost -= computeJointSegmentsCost(proposalSegment, server.getPeon().getSegmentsMarkedToDrop());
We minus the costs of segments that are marked to be dropped,but in CachingCostBalancerStrategy we didn't do the same thing.
// add segments that will be loaded to the cost
cost += costCacheForLoadingSegments(server).computeCost(serverName, proposalSegment);
if (server.getAvailableSize() <= 0) {
return Double.POSITIVE_INFINITY;
}