huginn created HBASE-30385:
------------------------------

             Summary: Avoid scheduling duplicate system region moves
                 Key: HBASE-30385
                 URL: https://issues.apache.org/jira/browse/HBASE-30385
             Project: HBase
          Issue Type: Bug
          Components: master
    Affects Versions: 2.4.11
            Reporter: huginn


When a newer-version RegionServer joins a mixed-version cluster, 
AssignmentManager.checkIfShouldMoveSystemRegionAsync() can schedule the same 
non-meta system-region move more than once when multiple excluded servers are 
processed.

The method accumulates RegionPlans in a list while iterating excluded servers, 
but currently iterates over the accumulated list inside that same loop. A plan 
collected from an earlier server is therefore submitted again when the next 
excluded server is processed. The second submission can hit the in-transition 
guard and emit an exception such as:

{code}
... is currently in transition; pid=...
{code}

This can also prevent the remaining plans from being submitted.

The fix is to submit the collected plans after the server loop, and use 
plan.getSource() in the log so the source server matches the plan.

Reproduction and validation:
* Use a mixed-version cluster with at least two excluded servers containing 
system regions.
* Source review against Apache master identifies the duplicated iteration.
* No unit test is included; this is a small control-flow and logging correction.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to