public long getTotalLinkedButDeletedTsfileSize() {
    try {
      return hardlinkOrCopiedFileToPipeTsFileResourceMap.values().parallelStream()
          .filter(PipeTsFileResource::isOriginalTsFileDeleted)
          .mapToLong(
              resource -> {
                try {
                  return resource.getFileSize();
                } catch (Exception e) {
                  LOGGER.warn(
                      "failed to get file size of linked but deleted TsFile {}: ", resource, e);
                  return 0;
                }
              })
          .sum();
    } catch (final Exception e) {
      LOGGER.warn("failed to get total size of linked but deleted TsFiles: ", e);
      return 0;
    }
  }
Get the total size of linked TsFiles whose original TsFile is deleted (by compaction or else)
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java