private long getAndSetNewVersion(long timePartitionId, TsFileResource tsFileResource) {
    long version =
        partitionMaxFileVersions.compute(
            timePartitionId, (key, oldVersion) -> (oldVersion == null ? 1 : oldVersion + 1));
    tsFileResource.setVersion(version);
    return version;
  }
Load a new tsfile to unsequence dir.

<p>Then, update the latestTimeForEachDevice and partitionLatestFlushedTimeForEachDevice.

@param newTsFileResource tsfile resource @UsedBy load external tsfile module
@param deleteOriginFile whether to delete origin tsfile
@param isGeneratedByPipe whether the load tsfile request is generated by pipe
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java