From e6977a95975580831a31d122c800d01cadac007a Mon Sep 17 00:00:00 2001 From: chaijunjie0101 <64140218+chaijunjie0101@users.noreply.github.com> Date: Sun, 19 Mar 2023 20:14:52 +0800 Subject: [PATCH] HBASE-27718 The regionStateNode only need remove once in regionOffline (#5106) Signed-off-by: Duo Zhang --- .../hadoop/hbase/master/assignment/AssignmentManager.java | 2 -- .../apache/hadoop/hbase/master/assignment/RegionStates.java | 5 ----- 2 files changed, 7 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java index 329806f1cf4..f2cfad87997 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java @@ -1094,8 +1094,6 @@ public class AssignmentManager { regionStateStore.deleteRegions(regions); for (int i = 0; i < regions.size(); ++i) { final RegionInfo regionInfo = regions.get(i); - // we expect the region to be offline - regionStates.removeFromOfflineRegions(regionInfo); regionStates.deleteRegion(regionInfo); } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java index ac1add375bd..a0f0ba9ab80 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java @@ -680,11 +680,6 @@ public class RegionStates { regionOffline.put(regionNode.getRegionInfo(), regionNode); } - // TODO: Unused. - public void removeFromOfflineRegions(final RegionInfo regionInfo) { - regionOffline.remove(regionInfo); - } - // ========================================================================== // Region FAIL_OPEN helpers // ==========================================================================