@TestOnly
  public long getSnapshotReferenceCount(String snapshotPath) {
    lock.lock();
    try {
      final AtomicLong count = copiedSnapshotPath2ReferenceCountMap.get(snapshotPath);
      return count != null ? count.get() : 0;
    } 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