From c0760d39dc2766c13d0794d658b4af245ce0f141 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 d8da72da30ff..c7bc2171791d 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 @@ -1043,8 +1043,6 @@ public void deleteTable(final TableName tableName) throws IOException { 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 adf376f68e09..26cbdb9288ff 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 void addToOfflineRegions(final RegionStateNode regionNode) { regionOffline.put(regionNode.getRegionInfo(), regionNode); } - // TODO: Unused. - public void removeFromOfflineRegions(final RegionInfo regionInfo) { - regionOffline.remove(regionInfo); - } - // ========================================================================== // Region FAIL_OPEN helpers // ==========================================================================