Umeshkumar9414 opened a new pull request, #8547: URL: https://github.com/apache/hbase/pull/8547
RegionMover.unloadRegions() previously picked destination servers from all online RegionServers regardless of RSGroup membership, potentially trying to move regions out of their assigned group during server decommission, althoug HMaster prevents it. This is a branch-2-compatible port of HBASE-22740. On master/branch-3 the fix used admin.getRSGroup() which is integrated directly into the Admin interface (via HBASE-22971). On branch-2 RSGroup remains an optional coprocessor (RSGroupAdminEndpoint), so we: 1. Check for RSGroupAdminEndpoint via getMasterCoprocessorNames() to skip the RSGroup path on clusters that do not use RSGroups. 2. Call getRSGroupInfoOfServer() via the RSGroupAdminService coprocessor RPC, using the unshaded protobuf service from hbase-protocol. 3. Filter the destination server list to only servers in the same RSGroup (filterRSGroupServers); filtering is always applied by membership — the DEFAULT_GROUP short-circuit that could leak regions across groups is removed. 4. Log a DEBUG message when hasRSGroupInfo()==false to aid diagnosis of hostname-vs-IP address-form mismatches (HBASE-27304). RSGroupAdmin.proto is moved from hbase-rsgroup to hbase-protocol so that hbase-server can use RSGroupAdminService without creating a circular dependency with hbase-rsgroup. Both modules depended on the same generated FQN; consolidating in hbase-protocol (which both already depend on) is best I could think of. Tests: - TestRegionMoverWithRSGroupEnable (hbase-rsgroup): 5-node mini cluster integration test with RSGroupAdminEndpoint enabled. Verifies that unloading a non-default-group server places all regions exclusively on the remaining server in that group (positive assertion) and that no default-group server receives any of those regions (isolation assertion). Also tests the guard path: unloading a default-group server succeeds end-to-end when RSGroups are enabled. - TestRegionMoverFilterRSGroupServers (hbase-server): unit tests for filterRSGroupServers() — default group returns full server list, non-default group filters to members only, no-match group returns empty. -- 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]
