private static void repairWalFileIfBroken(File walFile, WALMetaData metaData) {
    WALRepairWriter walRepairWriter = new WALRepairWriter(walFile);
    try {
      walRepairWriter.repair(metaData);
    } catch (IOException e) {
      logger.error("Fail to recover metadata of wal file {}", walFile, e);
    }
  }
This task is responsible for the recovery of one wal node.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALNodeRecoverTask.java