Description
While opening the region in RS after adding the region to regionsInTransitionInRS if tableDescriptors.get() throws exception the region wont be cleared from regionsInTransitionInRS. So next time if it tries to open the region in the same RS it will throw the RegionAlreadyInTransitionException.
if swap the below statement this issue wont come.
this.regionsInTransitionInRS.putIfAbsent(region.getEncodedNameAsBytes(),true); HTableDescriptor htd = this.tableDescriptors.get(region.getTableName());