@TestOnly
  public synchronized int getFileReferenceCount(final File hardlink) {
    return hardlinkToReferenceMap.getOrDefault(hardlink.getPath(), 0);
  }
given a hardlink, decrease its reference count, if the reference count is 0, delete the file.
if the given file is not a hardlink, do nothing.

@param hardlink the hardlinked file
@throws IOException when delete file failed
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/wal/hardlink/PipeWALHardlinkResourceManager.java