Sigma-Ma opened a new pull request, #8519:
URL: https://github.com/apache/hbase/pull/8519

   JIRA: https://issues.apache.org/jira/browse/HBASE-30303
   
   ### What changes were proposed in this pull request?
   
   This pull request updates `RSGroupBasedLoadBalancer#correctAssignments` to 
use the same candidate-server selection logic as region assignment when RSGroup 
fallback is enabled.
   
   When the target RSGroup has no online RegionServers, `correctAssignments` 
now validates region locations against the effective fallback candidates.
   
   The existing `TestRSGroupsFallback` test is also extended to verify that no 
region moves are calculated when regions are correctly hosted on fallback 
servers.
   
   
   ### Why are the changes needed?
   
   When RSGroup fallback is enabled and a table's target RSGroup has no online 
RegionServers, its regions are assigned to the default RSGroup, or to any 
available RegionServer if the default group is also unavailable.
   
   Previously, `correctAssignments` only validated these regions against the 
table's original RSGroup. Therefore, regions already hosted on valid fallback 
servers were incorrectly classified as misplaced during every balance run, 
resulting in continuous and unnecessary region movement.
   
   
   ### How was this patch tested?
   
   The following tests were executed:
   
   ```bash
   mvn -pl hbase-server \
     -am \
     -Dtest=org.apache.hadoop.hbase.rsgroup.TestRSGroupsFallback \
     -Dsurefire.failIfNoSpecifiedTests=false \
     test
   
   mvn -pl hbase-server \
     -am \
     
-Dtest=org.apache.hadoop.hbase.master.balancer.TestRSGroupBasedLoadBalancer \
     -Dsurefire.failIfNoSpecifiedTests=false \
     test
   
   ```
   
   `TestRSGroupsFallback` verifies that balancing calculates no moves after 
regions fall back to the default RSGroup and after they fall back to another 
available RSGroup.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to