From a6b99faa007086e4e8a9b8272148b67ecc20359c 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 (cherry picked from commit e6977a95975580831a31d122c800d01cadac007a) --- .../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 216585cf2e7..bee1841a23b 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 @@ -1087,8 +1087,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 adf376f68e0..26cbdb9288f 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 // ==========================================================================