@Override
  protected boolean doCompaction() {
    calculateRepairMethod();
    if (!sourceFile.getTsFileRepairStatus().isRepairCompactionCandidate()) {
      return true;
    }
    boolean isSuccess = super.doCompaction();
    if (!isSuccess) {
      LOGGER.info("Failed to repair file {}", sourceFile.getTsFile().getAbsolutePath());
      sourceFile.setTsFileRepairStatus(TsFileRepairStatus.CAN_NOT_REPAIR);
    }
    return isSuccess;
  }
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