public static DeletionResourceManager getInstance(String groupId) {
    // If consensusImpl is not PipeConsensus.
    if (DeletionResourceManagerHolder.CONSENSU_GROUP_ID_2_INSTANCE_MAP == null) {
      return null;
    }
    return DeletionResourceManagerHolder.CONSENSU_GROUP_ID_2_INSTANCE_MAP.computeIfAbsent(
        groupId,
        key -> {
          try {
            return new DeletionResourceManager(groupId);
          } catch (IOException e) {
            LOGGER.error("Failed to initialize DeletionResourceManager", e);
            throw new RuntimeException(e);
          }
        });
  }
This is a hook function, which will be automatically invoked when deletionResource's reference
count returns to 0.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/DeletionResourceManager.java