@Override
  public boolean equals(Object that) {
    if (that instanceof RemoveDataNodesProcedure) {
      RemoveDataNodesProcedure thatProc = (RemoveDataNodesProcedure) that;
      return thatProc.getProcId() == this.getProcId()
          && thatProc.getState() == this.getState()
          && thatProc.removedDataNodes.equals(this.removedDataNodes)
          && thatProc.regionMigrationPlans.equals(this.regionMigrationPlans);
    }
    return false;
  }
Used to keep procedure lock even when the procedure is yielded or suspended.

@param env env
@return true if hold the lock
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveDataNodesProcedure.java