jackMintao opened a new pull request, #8927:
URL: https://github.com/apache/hbase/pull/8927

   JIRA: https://issues.apache.org/jira/browse/HBASE-30566
   
   ## Problem
   
   After HBASE-25032, `HMaster` excludes an online RegionServer from
   `ServerManager#createDestinationServersList()` until
   `ServerMetrics#getLastReportTimestamp() > 0`.
   
   `RegionMover#getTargetServer()` only waits for the target server to appear
   in `Admin#getRegionServers()`. During `graceful_stop.sh --reload`, the
   target RS is typically listed there before its first `RegionServerReport`
   has been processed. RegionMover therefore starts moving regions while the
   target is still ineligible for assignment. The master reopens the region
   on the source RS, `MoveWithAck` waits for the source to change, and after
   `hbase.move.wait.max` (default 60s) the move pool reports
   `InterruptedException: sleep interrupted` (single meta region) or
   `Could not move region` (multiple regions). `graceful_stop.sh` still prints
   `Reloaded` and exits 0.
   
   ## Fix
   
   Wait for `ServerMetrics#getLastReportTimestamp() > 0` in
   `RegionMover#getTargetServer()` before returning the target, matching the
   master's assignment eligibility check. The existing
   `hbase.serverstart.wait.max` timeout is preserved, and a clear error is
   raised if the RS never reports.
   
   Only `RegionMover.java` is changed. `graceful_stop.sh` is not modified.
   
   ## Tests
   
   - `TestRegionMover1` (11), `TestRegionMover2` (12), `TestRegionMover3` (1),
     `TestRegionMoverFilterRSGroupServers` (3), `TestRegionMoverUseIp` (1):
     28 tests, 0 failures, 0 errors.
   - Manual reproduction on official HBase 2.6.7-hadoop3 with JDK 11:
     unpatched reload fails after 60s with `sleep interrupted`; with the fix
     the reload succeeds without a fixed delay.
   - A/B on official HBase 2.4.18 (no HBASE-25032) under the same JDK,
     configuration, startup sequence and script: reload succeeds.
   


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