private TPipeConsensusTransferResp preCheck(TCommitId tCommitId) {
      // if a req is deprecated, we will discard it
      // This case may happen in this scenario: leader has transferred {1,2} and is intending to
      // transfer {3, 4, 5, 6}. And in one moment, follower has received {4, 5, 6}, {3} is still
      // transferring due to some network latency.
      // At this time, leader restarts, and it will resend {3, 4, 5, 6} with incremental
      // rebootTimes. If the {3} sent before the leader restart arrives after the follower
      // receives
      // the request with incremental rebootTimes, the {3} sent before the leader restart needs to
      // be discarded.
      if (tCommitId.getDataNodeRebootTimes() < connectorRebootTimes) {
        return deprecatedResp(MSG_NODE_RESTART_INDEX_STALE, tCommitId);
      }
      // Similarly, check pipeTask restartTimes
      if (tCommitId.getDataNodeRebootTimes() == connectorRebootTimes
          && tCommitId.getPipeTaskRestartTimes() < pipeTaskRestartTimes) {
        return deprecatedResp(MSG_PIPE_RESTART_INDEX_STALE, tCommitId);
      }
      // Similarly, check replicationIndex
      if (tCommitId.getDataNodeRebootTimes() == connectorRebootTimes
          && tCommitId.getPipeTaskRestartTimes() == pipeTaskRestartTimes
          && tCommitId.getReplicateIndex() < onSyncedReplicateIndex + 1) {
        return deprecatedResp(MSG_STALE_REPLICATE_INDEX, tCommitId);
      }
      // pass check
      return null;
    }
An executor component to ensure all events sent from connector can be loaded in sequence,
although events can arrive receiver in a random sequence.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/pipeconsensus/PipeConsensusReceiver.java