public void insert(InsertRowNode insertRowNode) throws WriteProcessException {
    // reject insertions that are out of ttl
    long ttl = getTTL(insertRowNode);
    if (!CommonUtils.isAlive(insertRowNode.getTime(), ttl)) {
      throw new OutOfTTLException(
          insertRowNode.getTime(), (CommonDateTimeUtils.currentTime() - ttl));
    }
    StorageEngine.blockInsertionIfReject();
    long startTime = System.nanoTime();
    writeLock("InsertRow");
    PERFORMANCE_OVERVIEW_METRICS.recordScheduleLockCost(System.nanoTime() - startTime);
    try {
      if (deleted) {
        return;
      }
      // init map
      long timePartitionId = TimePartitionUtils.getTimePartitionId(insertRowNode.getTime());
      initFlushTimeMap(timePartitionId);

      boolean isSequence =
          config.isEnableSeparateData()
              && insertRowNode.getTime()
                  > lastFlushTimeMap.getFlushedTime(timePartitionId, insertRowNode.getDeviceID());

      // insert to sequence or unSequence file
      TsFileProcessor tsFileProcessor =
          insertToTsFileProcessor(insertRowNode, isSequence, timePartitionId);

      // check memtable size and may asyncTryToFlush the work memtable
      if (tsFileProcessor != null && tsFileProcessor.shouldFlush()) {
        fileFlushPolicy.apply(this, tsFileProcessor, tsFileProcessor.isSequence());
      }
      if (CommonDescriptor.getInstance().getConfig().isLastCacheEnable()
          && (!insertRowNode.isGeneratedByRemoteConsensusLeader())) {
        // disable updating last cache on follower
        startTime = System.nanoTime();
        tryToUpdateInsertRowLastCache(insertRowNode);
        PERFORMANCE_OVERVIEW_METRICS.recordScheduleUpdateLastCacheCost(
            System.nanoTime() - startTime);
      }
    } finally {
      writeUnlock();
    }
  }
insert one row of data.

@param insertRowNode one row of data
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java