public void updateLastCache(final String databaseName) {
    final String[] rawMeasurements = getRawMeasurements();
    final TimeValuePair[] timeValuePairs = new TimeValuePair[rawMeasurements.length];
    for (int i = 0; i < rawMeasurements.length; i++) {
      timeValuePairs[i] = composeLastTimeValuePair(i);
    }
    TreeDeviceSchemaCacheManager.getInstance()
        .updateLastCacheIfExists(
            databaseName,
            getDeviceID(),
            rawMeasurements,
            timeValuePairs,
            isAligned,
            measurementSchemas);
  }
@param results insertion result of each row
@param ttl the ttl
@return the position of the first alive row
@throws OutOfTTLException if all rows have expired the TTL
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertTabletNode.java