@Override
  public IConsensusRequest deserializeRequest(IConsensusRequest request) {
    IConsensusRequest result;
    if (request instanceof IndexedConsensusRequest) {
      IndexedConsensusRequest indexedRequest = (IndexedConsensusRequest) request;
      result = grabPlanNode(indexedRequest);
    } else if (request instanceof BatchIndexedConsensusRequest) {
      BatchIndexedConsensusRequest batchRequest = (BatchIndexedConsensusRequest) request;
      DeserializedBatchIndexedConsensusRequest deserializedRequest =
          new DeserializedBatchIndexedConsensusRequest(
              batchRequest.getStartSyncIndex(),
              batchRequest.getEndSyncIndex(),
              batchRequest.getRequests().size());
      for (IndexedConsensusRequest indexedRequest : batchRequest.getRequests()) {
        final PlanNode planNode = grabPlanNode(indexedRequest);
        if (planNode instanceof ComparableConsensusRequest) {
          final IoTProgressIndex ioTProgressIndex =
              new IoTProgressIndex(batchRequest.getSourcePeerId(), indexedRequest.getSyncIndex());
          ((ComparableConsensusRequest) planNode).setProgressIndex(ioTProgressIndex);
        }
        deserializedRequest.add(planNode);
      }
      result = deserializedRequest;
    } else {
      result = getPlanNode(request);
    }
    return result;
  }
Deserialize request to PlanNode or BatchedIndexedRequest

@param request write request
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/IoTConsensusDataRegionStateMachine.java