public void recoverSettleTaskInfoFromLogFile() throws IOException {
    LOGGER.info(
        "{}-{} [Compaction][Recover] compaction log is {}",
        storageGroupName,
        dataRegionId,
        logFile);
    CompactionLogAnalyzer logAnalyzer = new CompactionLogAnalyzer(this.logFile);
    logAnalyzer.analyze();
    List<TsFileIdentifier> sourceFileIdentifiers = logAnalyzer.getSourceFileInfos();
    List<TsFileIdentifier> targetFileIdentifiers = logAnalyzer.getTargetFileInfos();
    List<TsFileIdentifier> deletedTargetFileIdentifiers = logAnalyzer.getDeletedTargetFileInfos();

    fullyDirtyFiles = new ArrayList<>();
    List<TsFileResource> selectedTsFileResourceList = new ArrayList<>();
    // recover source files, including fully_dirty files and partially_dirty files
    for (TsFileIdentifier x : sourceFileIdentifiers) {
      File sourceFile = x.getFileFromDataDirsIfAnyAdjuvantFileExists();
      TsFileResource resource;
      if (sourceFile == null) {
        // source file has been deleted, create empty resource
        resource = new TsFileResource(new File(x.getFilePath()));
      } else {
        resource = new TsFileResource(sourceFile);
      }
      if (deletedTargetFileIdentifiers.contains(x)) {
        fullyDirtyFiles.add(resource);
      } else {
        selectedTsFileResourceList.add(resource);
      }
    }

    filesView.setSourceFilesForRecover(selectedTsFileResourceList);
    // recover target file
    recoverTargetResource(targetFileIdentifiers, deletedTargetFileIdentifiers);
  }
Use inner compaction task to compact the partially_dirty files.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/SettleCompactionTask.java