public void deserialize(ByteBuffer byteBuffer) {
    // procid
    this.setProcId(byteBuffer.getLong());
    // state
    this.setState(ProcedureState.values()[byteBuffer.getInt()]);
    //  submit time
    this.setSubmittedTime(byteBuffer.getLong());
    //  last updated
    this.setLastUpdate(byteBuffer.getLong());
    //  parent id
    this.setParentProcId(byteBuffer.getLong());
    //  time out
    this.setTimeout(byteBuffer.getLong());
    //  stack index
    int stackIndexesLen = byteBuffer.getInt();
    if (stackIndexesLen >= 0) {
      List<Integer> indexList = new ArrayList<>(stackIndexesLen);
      for (int i = 0; i < stackIndexesLen; i++) {
        indexList.add(byteBuffer.getInt());
      }
      this.setStackIndexes(indexList);
    }

    // exception
    if (byteBuffer.get() == 1) {
      deserializeTypeInfoForCompatibility(byteBuffer);
      int messageBytesLength = byteBuffer.getInt();
      String errMsg = null;
      if (messageBytesLength > 0) {
        byte[] messageBytes = new byte[messageBytesLength];
        byteBuffer.get(messageBytes);
        errMsg = new String(messageBytes, StandardCharsets.UTF_8);
      }
      setFailure(new ProcedureException(errMsg));
    }

    // result
    int resultLen = byteBuffer.getInt();
    if (resultLen > 0) {
      byte[] resultArr = new byte[resultLen];
      byteBuffer.get(resultArr);
    }
    //  has lock
    if (byteBuffer.get() == 1) {
      this.lockedWhenLoading();
    }
  }
The code to undo what was done by the execute() code. It is called when the procedure or one of
the sub-procedures failed or an abort was requested. It should cleanup all the resources
created by the execute() call. The implementation must be idempotent since rollback() may be
called multiple time in case of machine failure in the middle of the execution.

@param env the environment passed to the ProcedureExecutor
@throws IOException temporary failure, the rollback will retry later
@throws InterruptedException the procedure will be added back to the queue and retried later
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/Procedure.java