private boolean executeInsertTablet(
      InsertTabletNode insertTabletNode, TSStatus[] results, long[] infoForMetrics)
      throws OutOfTTLException {
    boolean noFailure;
    int loc = insertTabletNode.checkTTL(results, getTTL(insertTabletNode));
    noFailure = loc == 0;
    List<Pair<IDeviceID, Integer>> deviceEndOffsetPairs =
        insertTabletNode.splitByDevice(loc, insertTabletNode.getRowCount());
    int start = loc;
    Map<Long, List<int[]>[]> splitInfo = new HashMap<>();
    for (Pair<IDeviceID, Integer> deviceEndOffsetPair : deviceEndOffsetPairs) {
      int end = deviceEndOffsetPair.getRight();
      split(insertTabletNode, start, end, splitInfo);
      start = end;
    }
    noFailure = doInsert(insertTabletNode, splitInfo, results, infoForMetrics) && noFailure;

    if (CommonDescriptor.getInstance().getConfig().isLastCacheEnable()
        && !insertTabletNode.isGeneratedByRemoteConsensusLeader()) {
      // disable updating last cache on follower
      long startTime = System.nanoTime();
      tryToUpdateInsertTabletLastCache(insertTabletNode);
      PERFORMANCE_OVERVIEW_METRICS.recordScheduleUpdateLastCacheCost(System.nanoTime() - startTime);
    }
    return noFailure;
  }
Insert a tablet into this database.

@throws BatchProcessException if some of the rows failed to be inserted
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java