private void settleWithPartiallyDirtyFiles(SimpleCompactionLogger logger) throws Exception {
    if (filesView.sourceFilesInCompactionPerformer.isEmpty()) {
      return;
    }
    LOGGER.info(
        "{}-{} [Compaction] Start to settle {} {} partially_dirty files, "
            + "total file size is {} MB",
        storageGroupName,
        dataRegionId,
        filesView.sourceFilesInCompactionPerformer.size(),
        filesView.sequence ? "Sequence" : "Unsequence",
        filesView.selectedFileSize / 1024 / 1024);
    long startTime = System.currentTimeMillis();
    compact(logger);
    double costTime = (System.currentTimeMillis() - startTime) / 1000.0d;
    LOGGER.info(
        "{}-{} [Compaction] Finish to settle {} {} partially_dirty files successfully , "
            + "target file is {},"
            + "time cost is {} s, "
            + "compaction speed is {} MB/s, {}",
        storageGroupName,
        dataRegionId,
        filesView.sourceFilesInCompactionPerformer.size(),
        filesView.sequence ? "Sequence" : "Unsequence",
        filesView.targetFilesInLog.get(0).getTsFile().getName(),
        String.format("%.2f", costTime),
        String.format("%.2f", filesView.selectedFileSize / 1024.0d / 1024.0d / costTime),
        summary);
  }
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