private BitSetNode delete(BitSetNode node, long procId) {
    node = lookupClosestNode(node, procId);
    if (node == null || !node.contains(procId)) {
      LOG.warn("The BitSetNode for procId={} does not exist, maybe a double deletion?", procId);
      return node;
    }
    node.delete(procId);
    if (!keepDeletes && node.isEmpty()) {
      // TODO: RESET if (map.size() == 1)
      map.remove(node.getStart());
    }

    trackProcIds(procId);
    return node;
  }
Resets internal state to same as given {@code tracker}, and change the deleted flag according
to the modified flag if {@code resetDelete} is true. Does deep copy of the bitmap.
<p/>
The {@code resetDelete} will be set to true when building cleanup tracker, please see the
comments in {@link BitSetNode#BitSetNode(BitSetNode, boolean)} to learn how we change the
deleted flag if {@code resetDelete} is true.
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureStoreTracker.java