public long getFileSize() {
    if (fileSize == -1L) {
      synchronized (this) {
        if (fileSize == -1L) {
          fileSize = hardlinkOrCopiedFile.length();
        }
      }
    }
    return fileSize;
  }
this TsFileResource is used to track the {@link TsFileResourceStatus} of original TsFile. *
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResource.java