[
https://issues.apache.org/jira/browse/HBASE-18480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16106876#comment-16106876
]
Chia-Ping Tsai commented on HBASE-18480:
----------------------------------------
bq. where is the 'undo' happening sir?
{code:title=StochasticLoadBalancer.java}
public synchronized List<RegionPlan> balanceCluster(Map<ServerName,
List<HRegionInfo>> clusterState)
{
newCost = computeCost(cluster, currentCost);
// Should this be kept?
if (newCost < currentCost) {
currentCost = newCost;
// save for JMX
curOverallCost = currentCost;
for (int i = 0; i < this.curFunctionCosts.length; i++) {
curFunctionCosts[i] = tempFunctionCosts[i];
}
} else {
// Put things back the way they were before.
// TODO: undo by remembering old values
Action undoAction = action.undoAction(); // here
cluster.doAction(undoAction);
updateCostsWithAction(cluster, undoAction);
}
}
{code}
> The cost of BaseLoadBalancer.cluster is changed even if the rollback is done
> ----------------------------------------------------------------------------
>
> Key: HBASE-18480
> URL: https://issues.apache.org/jira/browse/HBASE-18480
> Project: HBase
> Issue Type: Bug
> Affects Versions: 3.0.0, 1.3.0, 1.2.6, 2.0.0-alpha-1
> Reporter: Chia-Ping Tsai
> Assignee: Chia-Ping Tsai
> Fix For: 3.0.0, 1.4.0, 1.3.2, 1.5.0, 1.2.7, 2.0.0-alpha-2
>
> Attachments: HBASE-18480.branch-1.v0.patch, HBASE-18480.v0.patch
>
>
> If the cost of cluster isn't restored after the undo action,
> StochasticLoadBalancer will be hard to generate the "good" action to balance
> the cluster.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)