Huginn-kio opened a new pull request, #8658:
URL: https://github.com/apache/hbase/pull/8658

   ## HBASE-30385
   
   ### Summary
   
   `AssignmentManager.checkIfShouldMoveSystemRegionAsync()` can schedule the 
same
   system-region move more than once when multiple excluded RegionServers are
   processed. This can cause a subsequent move submission to fail because the
   region is already in transition. See 
[HBASE-30385](https://issues.apache.org/jira/browse/HBASE-30385).
   
   ### Root cause
   
   On Apache master, `plans` is collected before the loop over excluded servers,
   but the loop that submits the collected plans is inside that outer loop
   
(`hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java`,
   around lines 741-745). Plans collected from an earlier server are therefore
   submitted again for each later excluded server. The log also reports the 
outer
   loop variable instead of the plan source.
   
   ### Fix
   
   - Submit the collected `RegionPlan`s after processing all excluded servers.
   - Log `plan.getSource()` so the reported source matches the plan being moved.
   
   ### Testing
   
   - **Failing-before-fix evidence:** The duplicate scheduling is demonstrated 
by
     the existing control flow and the reported in-transition exception; no
     standalone regression test was added.
   - **Passing-after-fix evidence:** `git diff --check` passed.
   - **Neighbor regression slice:** Not run; no unit test was added for this
     small control-flow correction.
   - **Static analysis:** Targeted checkstyle completed with no violations on 
the
     modified lines. The full file still reports three pre-existing violations
     outside this diff.
   
   ### Compatibility
   
   - Public API impact: none
   - Config impact: none
   - Persisted format impact: none
   - Wire format impact: none
   
   ### Related
   
   - Internal ticket: SPDI-203748
   - Cherry-picked from internal commit: `967da24d337` on
     `codex/spdi-203748-duplicate-system-region-move`
   


-- 
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