private TsFileProcessor insertToTsFileProcessor(
      InsertRowNode insertRowNode, boolean sequence, long timePartitionId)
      throws WriteProcessException {
    TsFileProcessor tsFileProcessor = getOrCreateTsFileProcessor(timePartitionId, sequence);
    if (tsFileProcessor == null || insertRowNode.allMeasurementFailed()) {
      return null;
    }
    long[] infoForMetrics = new long[5];
    // infoForMetrics[0]: CreateMemtableBlockTimeCost
    // infoForMetrics[1]: ScheduleMemoryBlockTimeCost
    // infoForMetrics[2]: ScheduleWalTimeCost
    // infoForMetrics[3]: ScheduleMemTableTimeCost
    // infoForMetrics[4]: InsertedPointsNumber
    tsFileProcessor.insert(insertRowNode, infoForMetrics);
    updateTsFileProcessorMetric(insertRowNode, infoForMetrics);
    // register TableSchema (and maybe more) for table insertion
    registerToTsFile(insertRowNode, tsFileProcessor);
    return tsFileProcessor;
  }
insert batch to tsfile processor thread-safety that the caller need to guarantee The rows to be
inserted are in the range [start, end) Null value in each column values will be replaced by the
subsequent non-null value, e.g., {1, null, 3, null, 5} will be {1, 3, 5, null, 5}

@param insertTabletNode insert a tablet of a device
@param sequence whether is sequence
@param rangeList start and end index list of rows to be inserted in insertTabletPlan
@param results result array
@param timePartitionId time partition id
@return false if any failure occurs when inserting the tablet, true otherwise
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java