HBASE-30385 Fix duplicate system region move scheduling - #8658
Open
Huginn-kio wants to merge 1 commit into
Open
Huginn-kio wants to merge 1 commit into
Huginn-kio wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HBASE-30385
Summary
AssignmentManager.checkIfShouldMoveSystemRegionAsync()can schedule the samesystem-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.
Root cause
On Apache master,
plansis 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
RegionPlans after processing all excluded servers.plan.getSource()so the reported source matches the plan being moved.Testing
the existing control flow and the reported in-transition exception; no
standalone regression test was added.
git diff --checkpassed.small control-flow correction.
modified lines. The full file still reports three pre-existing violations
outside this diff.
Compatibility