private boolean increaseReferenceIfExists(final String path) {
    hardlinkToReferenceMap.computeIfPresent(path, (k, v) -> v + 1);
    return hardlinkToReferenceMap.containsKey(path);
  }
given a file, create a hardlink, maintain a reference count for the hardlink, and return the
hardlink.

<p>if the given file is already a hardlink, increase its reference count and return it.

<p>if the given file is a wal, create a hardlink in pipe dir, increase the reference count of
the hardlink and return it.

@param file wal file. can be original file or the hardlink of original file
@return the hardlink
@throws IOException when create hardlink failed
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/wal/hardlink/PipeWALHardlinkResourceManager.java