public void decreaseSnapshotReference(String snapshotPath) {
    lock.lock();
    try {
      final AtomicLong referenceCount = copiedSnapshotPath2ReferenceCountMap.get(snapshotPath);
      if (referenceCount == null) {
        return;
      }

      final long count = referenceCount.decrementAndGet();
      if (count == 0) {
        copiedSnapshotPath2ReferenceCountMap.remove(snapshotPath);
        FileUtils.deleteFileOrDirectoryWithRetry(new File(snapshotPath));
      }
    } finally {
      lock.unlock();
    }
  }
Decrease the reference count of the snapshot. If the reference count is decreased to 0, delete
the snapshot.

@param snapshotPath copied snapshot path to be decreased
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/resource/snapshot/PipeSnapshotResourceManager.java