@Override
    public void insert(Procedure<?>[] procs) {
      long max = -1;
      synchronized (procMap) {
        try {
          for (Procedure<?> p : procs) {
            procMap.put(p.getProcId(), ProcedureUtil.convertToProtoProcedure(p));
            max = Math.max(max, p.getProcId());
          }
        } catch (IOException e) {
          throw new UncheckedIOException(e);
        }
      }
      AtomicUtils.updateMax(maxProcId, max);
    }
Testcase for HBASE-28210, where we persist the procedure which has been inserted later to
{@link RootProcedureState} first and then crash, and then cause holes in stack ids when loading,
and finally fail the start up of master.
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestStackIdHoles.java