shuwenwei commented on code in PR #12744:
URL: https://github.com/apache/iotdb/pull/12744#discussion_r1680787639
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/FastCompactionInnerCompactionEstimator.java:
##########
@@ -76,4 +83,18 @@ public long calculatingDataMemoryCost(CompactionTaskInfo
taskInfo) throws IOExce
+ maxConcurrentChunkSizeFromSourceFile
+ taskInfo.getModificationFileSize();
}
+
+ @Override
+ public long roughEstimateInnerCompactionMemory(List<TsFileResource>
resources)
+ throws IOException {
+ int maxConcurrentSeriesNum =
+ Math.max(
+ config.getCompactionMaxAlignedSeriesNumInOneBatch(),
config.getSubCompactionTaskNum());
+ long maxChunkSize = config.getTargetChunkSize();
+ long maxPageSize = tsFileConfig.getPageSizeInByte();
+ int maxOverlapFileNum =
calculatingMaxOverlapFileNumInSubCompactionTask(resources);
+ // source files (chunk + uncompressed page) * overlap file num
+ // target file (chunk + unsealed page writer)
+ return (maxOverlapFileNum + 1) * maxConcurrentSeriesNum * (maxChunkSize +
maxPageSize);
Review Comment:
Unsequence inner space compaction have overlapping files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]