Skip to content

Commit

Permalink
HBASE-28226 Add logic to check for RegionStateNode null pointer in Fl…
Browse files Browse the repository at this point in the history
…ushRegionProcedure (#5548)

Co-authored-by: lvhaiping.lhp <lvhaiping.lhp@alibaba-inc.com>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 8631714)
  • Loading branch information
hiping-tech authored and Apache9 committed Dec 4, 2023
1 parent 9c80716 commit f6d96dc
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ protected Procedure<MasterProcedureEnv>[] execute(MasterProcedureEnv env)

RegionStates regionStates = env.getAssignmentManager().getRegionStates();
RegionStateNode regionNode = regionStates.getRegionStateNode(region);
if (regionNode == null) {
LOG.debug("Region {} is not in region states, it is very likely that it has been cleared by"
+ " other procedures such as merge or split, so skip {}. See HBASE-28226", region, this);
return null;
}
regionNode.lock();
try {
if (!regionNode.isInState(State.OPEN) || regionNode.isInTransition()) {
Expand Down

0 comments on commit f6d96dc

Please sign in to comment.