@Override
  protected void prepareTargetFiles() throws IOException {
    CompactionUtils.updateProgressIndexAndMark(
        filesView.targetFilesInPerformer,
        filesView.sourceFilesInCompactionPerformer,
        Collections.emptyList());
    CompactionUtils.moveTargetFile(
        filesView.targetFilesInPerformer,
        CompactionTaskType.REPAIR,
        storageGroupName + "-" + dataRegionId);

    LOGGER.info(
        "{}-{} [InnerSpaceCompactionTask] start to rename mods file",
        storageGroupName,
        dataRegionId);

    if (sourceFile.getTsFileRepairStatus() == TsFileRepairStatus.NEED_TO_REPAIR_BY_REWRITE) {
      CompactionUtils.combineModsInInnerCompaction(
          filesView.sourceFilesInCompactionPerformer, filesView.targetFilesInPerformer);
    } else {
      if (sourceFile.anyModFileExists()) {
        sourceFile.linkModFile(filesView.targetFilesInPerformer.get(0));
      }
      if (TsFileResource.useSharedModFile) {
        filesView
            .targetFilesInPerformer
            .get(0)
            .setSharedModFile(sourceFile.getSharedModFile(), false);
      }
    }
  }
Repair the internal unsorted file by compaction and move it to unSequence space after compaction
whether the source TsFileResource is sequence or not.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java