@Override
  protected void afterExec(MasterProcedureEnv env) {
    // only release the lock if there is no pending updating meta operation
    if (future == null) {
      RegionStateNode regionNode = getRegionNode(env);
      // in beforeExec, we may throw ProcedureSuspendedException which means we do not get the lock,
      // in this case we should not call unlock
      if (regionNode.isLockedBy(this)) {
        regionNode.unlock(this);
      }
    }
  }
The base class for the remote procedures used to open/close a region.
<p/>
Notice that here we do not care about the result of the remote call, if the remote call is
finished, either succeeded or not, we will always finish the procedure. The parent procedure
should take care of the result and try to reschedule if the result is not good.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionRemoteProcedureBase.java