choubenson commented on code in PR #12122: URL: https://github.com/apache/iotdb/pull/12122#discussion_r1571684329
########## iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduler.java: ########## @@ -100,11 +102,19 @@ public static int scheduleCompaction( // the name of this variable is trySubmitCount, because the task submitted to the queue could be // evicted due to the low priority of the task int trySubmitCount = 0; - trySubmitCount += tryToSubmitCrossSpaceCompactionTask(tsFileManager, timePartition, summary); - trySubmitCount += - tryToSubmitInnerSpaceCompactionTask(tsFileManager, timePartition, true, summary); - trySubmitCount += - tryToSubmitInnerSpaceCompactionTask(tsFileManager, timePartition, false, summary); + try { + trySubmitCount += tryToSubmitCrossSpaceCompactionTask(tsFileManager, timePartition, summary); + trySubmitCount += + tryToSubmitInnerSpaceCompactionTask(tsFileManager, timePartition, true, summary); + trySubmitCount += + tryToSubmitInnerSpaceCompactionTask(tsFileManager, timePartition, false, summary); + trySubmitCount += + tryToSubmitSettleCompactionTask(tsFileManager, timePartition, summary, false); + } catch (InterruptedException e) { Review Comment: It's better to place the `tryToSubmitSettleCompactionTask` at the end when selecting files, as it also cleans up dirty data in cross space compaction and inner space compaction. Placing it at the beginning may increase read-write amplification during compaction. -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org