Repository navigation
HBASE-30566 Wait for target RegionServer first report in RegionMover - #8927
Open
jackMintao wants to merge 1 commit into
Open
jackMintao wants to merge 1 commit into
jackMintao wants to merge 1 commit into
Conversation
Since HBASE-25032, HMaster excludes region servers that have not sent their first RegionServerReport from createDestinationServersList(). RegionMover.getTargetServer() only waited for the target to appear in Admin#getRegionServers(), so graceful_stop --reload could target an ineligible server, leave the region on the source RS and time out after 60s. Wait for ServerMetrics#getLastReportTimestamp() > 0 before returning the target server, matching the master's assignment eligibility check.
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.
JIRA: https://issues.apache.org/jira/browse/HBASE-30566
Problem
After HBASE-25032,
HMasterexcludes an online RegionServer fromServerManager#createDestinationServersList()untilServerMetrics#getLastReportTimestamp() > 0.RegionMover#getTargetServer()only waits for the target server to appearin
Admin#getRegionServers(). Duringgraceful_stop.sh --reload, thetarget RS is typically listed there before its first
RegionServerReporthas been processed. RegionMover therefore starts moving regions while the
target is still ineligible for assignment. The master reopens the region
on the source RS,
MoveWithAckwaits for the source to change, and afterhbase.move.wait.max(default 60s) the move pool reportsInterruptedException: sleep interrupted(single meta region) orCould not move region(multiple regions).graceful_stop.shstill printsReloadedand exits 0.Fix
Wait for
ServerMetrics#getLastReportTimestamp() > 0inRegionMover#getTargetServer()before returning the target, matching themaster's assignment eligibility check. The existing
hbase.serverstart.wait.maxtimeout is preserved, and a clear error israised if the RS never reports.
Only
RegionMover.javais changed.graceful_stop.shis not modified.Tests
TestRegionMover1(11),TestRegionMover2(12),TestRegionMover3(1),TestRegionMoverFilterRSGroupServers(3),TestRegionMoverUseIp(1):28 tests, 0 failures, 0 errors.
unpatched reload fails after 60s with
sleep interrupted; with the fixthe reload succeeds without a fixed delay.
configuration, startup sequence and script: reload succeeds.