[ https://issues.apache.org/jira/browse/IOTDB-5147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17695996#comment-17695996 ]
周沛辰 commented on IOTDB-5147: ---------------------------- h3. The changes in this pr are as follows: # Change the size of the candidateCompactionTaskQueue from 1000 to 50. The advantage is to avoid tasks blocked in the queue occupying files for a long time, resulting in no files being selected for cross-space compaction. But another impact is that once the number of files is large, because the number of tasks in the queue shrinks, the inner-space compaction will not be able to compact the latest files. # Priority comparison of tasks: Inner-space compaction tasks no longer distinguish between seq and unseq, but are sorted according to unified rules; under the configuration of BALANCE, cross-space compaction tasks and inner-space compaction tasks follow the first-come-first-executed rule . One thing to note is that since the priority sorting of the queue is implemented through the minimum heap sorting, and each task is not in partial order, the actual result is not strictly that the one with the smaller seriesID will be executed first. # Inner seq task and inner unseq task is submitted one by one, to avoid submitting too many inner seq tasks at one time, filling up the queue, resulting in no opportunity to submit inner unseq tasks. > Optimize compaction schedule when priority is BALANCE > ----------------------------------------------------- > > Key: IOTDB-5147 > URL: https://issues.apache.org/jira/browse/IOTDB-5147 > Project: Apache IoTDB > Issue Type: Improvement > Reporter: 周沛辰 > Assignee: 周沛辰 > Priority: Major > Labels: pull-request-available > Fix For: master branch, 1.1.0-SNAPSHOT > > > When the priority is BALANCE, there will be a problem with the compaction > schedule, that is, when new inner space compaction tasks are continuously > submitted to the priority queue, cross space compaction tasks will be starved > to death. -- This message was sent by Atlassian Jira (v8.20.10#820010)