[
https://issues.apache.org/jira/browse/HBASE-25635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17295779#comment-17295779
]
Viraj Jasani commented on HBASE-25635:
--------------------------------------
Are you proposing the same patch as this one
[https://github.com/apache/hbase/pull/2293] ?
If so, can you check if you could resolve test failures. Once done, we can
merge the changes and mark HBASE-24931 as duplicate.
> CandidateGenerator may miss some region balance actions
> -------------------------------------------------------
>
> Key: HBASE-25635
> URL: https://issues.apache.org/jira/browse/HBASE-25635
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 2.0.0
> Reporter: Xiaolin Ha
> Assignee: Xiaolin Ha
> Priority: Major
>
> {color:#172b4d}In codes of CandidateGenerator#getAction(),valid region index
> are greater or equal to zero. Currently only regions with greater than zero
> indexes can get balance actions.{color}
> {code:java}
> protected BaseLoadBalancer.Cluster.Action getAction(int fromServer, int
> fromRegion,
> int toServer, int toRegion) {
> if (fromServer < 0 || toServer < 0) {
> return BaseLoadBalancer.Cluster.NullAction;
> }
> if (fromRegion > 0 && toRegion > 0) {
> return new BaseLoadBalancer.Cluster.SwapRegionsAction(fromServer,
> fromRegion,
> toServer, toRegion);
> } else if (fromRegion > 0) {
> return new BaseLoadBalancer.Cluster.MoveRegionAction(fromRegion,
> fromServer, toServer);
> } else if (toRegion > 0) {
> return new BaseLoadBalancer.Cluster.MoveRegionAction(toRegion, toServer,
> fromServer);
> } else {
> return BaseLoadBalancer.Cluster.NullAction;
> }
> }{code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)