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 3ad61d426b7..b1c11af2b9b 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 @@ public class RegionStates { 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; } }