protected synchronized boolean removeStackIndex() {
    if (stackIndexes != null && stackIndexes.length > 1) {
      stackIndexes = Arrays.copyOf(stackIndexes, stackIndexes.length - 1);
      return false;
    } else {
      stackIndexes = null;
      return true;
    }
  }
Called by the RootProcedureState on procedure execution. Each procedure store its stack-index
positions.
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java