private boolean checkAndDeleteFile(File file) {
    if (file == null || !file.exists()) {
      return true;
    }
    try {
      Files.delete(file.toPath());
    } catch (IOException e) {
      LOGGER.error(
          "{} [Compaction][Recover] failed to remove file {}, exception: {}",
          fullStorageGroupName,
          file,
          e);
      return false;
    }
    return true;
  }
Return true if the file is not existed or if the file is existed and has been deleted
correctly. Otherwise, return false.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverTask.java