protected void handleRecoverException(Exception e) {
    // all files in this data region may be deleted directly without acquire lock or transfer
    // TsFileResourceStatus
    if (!tsFileManager.isAllowCompaction()) {
      return;
    }
    LOGGER.error(
        "{} [Compaction][Recover] Failed to recover compaction. TaskInfo: {}, Exception: {}",
        dataRegionId,
        this,
        e);
    // Do not set allow compaction to false here. To keep the error environment, mark all source
    // files in memory to avoid compaction.
    for (TsFileResource sourceTsFileResource : getAllSourceTsFiles()) {
      sourceTsFileResource.setTsFileRepairStatus(TsFileRepairStatus.CAN_NOT_REPAIR);
    }
  }
This method will try to set the files to COMPACTION_CANDIDATE. If failed, it should roll back
all status to original value

@return set status successfully or not
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java