public void decreaseFileReference(final File hardlinkOrCopiedFile) {
    segmentLock.lock(hardlinkOrCopiedFile);
    try {
      final String filePath = hardlinkOrCopiedFile.getPath();
      final PipeTsFileResource resource = hardlinkOrCopiedFileToPipeTsFileResourceMap.get(filePath);
      if (resource != null) {
        resource.decreaseAndGetReference();
      }
    } finally {
      segmentLock.unlock(hardlinkOrCopiedFile);
    }
  }
Given a hardlink or copied file, decrease its reference count, if the reference count is 0,
delete the file. if the given file is not a hardlink or copied file, do nothing.

@param hardlinkOrCopiedFile the copied or hardlinked file
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java