Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
-
Reviewed
Description
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.
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; } }
Attachments
Attachments
Issue Links
- duplicates
-
HBASE-24931 Candidate Generator helper getAction method ignoring 0th index region
- Resolved
- links to