CompletableFuture<Void> regionFailedOpen(RegionStateNode regionNode, boolean giveUp) {
    RegionState.State state = regionNode.getState();
    ServerName regionLocation = regionNode.getRegionLocation();
    if (!giveUp) {
      if (regionLocation != null) {
        regionStates.removeRegionFromServer(regionLocation, regionNode);
      }
      return CompletableFuture.completedFuture(null);
    }
    regionNode.setState(State.FAILED_OPEN);
    regionNode.setRegionLocation(null);
    CompletableFuture<Void> future = regionStateStore.updateRegionLocation(regionNode);
    FutureUtils.addListener(future, (r, e) -> {
      if (e == null) {
        if (regionLocation != null) {
          regionStates.removeRegionFromServer(regionLocation, regionNode);
        }
      } else {
        // revert
        regionNode.setState(state);
        regionNode.setRegionLocation(regionLocation);
      }
    });
    return future;
  }
Resolve a cached {@link RegionInfo} from the encoded region name as a {@code String}.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java