public long estimateInnerCompactionMemory(List<TsFileResource> resources) throws IOException {
    CompactionEstimateUtils.addReadLock(resources);
    long cost;
    try {
      CompactionTaskInfo taskInfo = calculatingCompactionTaskInfo(resources);
      cost = calculatingMetadataMemoryCost(taskInfo);
      cost += calculatingDataMemoryCost(taskInfo);
    } finally {
      CompactionEstimateUtils.releaseReadLock(resources);
    }
    return cost;
  }
Estimate the memory cost of one inner space compaction task with specific source files based on
its corresponding implementation.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/AbstractInnerSpaceEstimator.java