Skip to content

Commit

Permalink
HBASE-28109 NPE for the region state: Failed to become active master …
Browse files Browse the repository at this point in the history
…(HMaster) (#5432)

The RegionState for meta region could be null for a fresh new cluster, we should also wait a bit to let it finish the initialization.

Signed-off-by: Duo Zhang <[email protected]>
  • Loading branch information
hanke580 authored Oct 7, 2023
1 parent 6455c49 commit 865a595
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ private boolean isRegionOnline(RegionInfo ri) {
RetryCounter rc = null;
while (!isStopped()) {
RegionState rs = this.assignmentManager.getRegionStates().getRegionState(ri);
if (rs.isOpened()) {
if (rs != null && rs.isOpened()) {
if (this.getServerManager().isServerOnline(rs.getServerName())) {
return true;
}
Expand Down

0 comments on commit 865a595

Please sign in to comment.