HTHou commented on a change in pull request #2605:
URL: https://github.com/apache/iotdb/pull/2605#discussion_r579584857



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -1940,19 +1940,26 @@ private void 
closeUnsealedTsFileProcessorCallBack(TsFileProcessor tsFileProcesso
         "signal closing storage group condition in {}",
         logicalStorageGroupName + "-" + virtualStorageGroupId);
 
+    executeCompaction(
+        tsFileProcessor.getTimeRangeId(),
+        IoTDBDescriptor.getInstance().getConfig().isForceFullMerge());
+  }
+
+  private void executeCompaction(long timePartition, boolean fullMerge){
     if (!compactionMergeWorking && 
!CompactionMergeTaskPoolManager.getInstance().isTerminated()) {
       compactionMergeWorking = true;
       logger.info(
           "{} submit a compaction merge task",
           logicalStorageGroupName + "-" + virtualStorageGroupId);
       try {
         // fork and filter current tsfile, then commit then to compaction merge
-        tsFileManagement.forkCurrentFileList(tsFileProcessor.getTimeRangeId());
+        tsFileManagement.forkCurrentFileList(timePartition);
+        tsFileManagement.setForceFullMerge(fullMerge);
         CompactionMergeTaskPoolManager.getInstance()
             .submitTask(
                 tsFileManagement
                 .new CompactionMergeTask(
-                    this::closeCompactionMergeCallBack, 
tsFileProcessor.getTimeRangeId()));
+                    this::closeCompactionMergeCallBack, timePartition));

Review comment:
       ```suggestion
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to