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 3ad61d426b75..b1c11af2b9bf 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 @@ -126,7 +126,11 @@ RegionStateNode createRegionStateNode(RegionInfo regionInfo) { synchronized (regionsMapLock) { RegionStateNode node = regionsMap.computeIfAbsent(regionInfo.getRegionName(), key -> new RegionStateNode(regionInfo, regionInTransition)); - encodedRegionsMap.putIfAbsent(regionInfo.getEncodedName(), node); + + if (encodedRegionsMap.get(regionInfo.getEncodedName()) != node) { + encodedRegionsMap.put(regionInfo.getEncodedName(), node); + } + return node; } }