Skip to content

The costs of segments that are marked to be dropped in CostBalancerStrategy shoud be computed #10334

@licl2014

Description

@licl2014

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;
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions