[
https://issues.apache.org/jira/browse/HBASE-25635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Duo Zhang resolved HBASE-25635.
-------------------------------
Fix Version/s: 2.4.3
2.3.5
2.5.0
3.0.0-alpha-1
Hadoop Flags: Reviewed
Resolution: Fixed
Pushed to branch-2.3+.
Thanks [~Xiaolin Ha] for contributing. Thanks [~vjasani] for reviewing.
> 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
> Fix For: 3.0.0-alpha-1, 2.5.0, 2.3.5, 2.4.3
>
> Attachments: 1614940188041-image.png
>
>
> {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)