public WALRecoverListener addRecoverPerformer(UnsealedTsFileRecoverPerformer recoverPerformer) {
    if (hasStarted) {
      logger.error("Cannot recover tsfile from wal because wal recovery has already started");
      return null;
    } else {
      try {
        String tsFileRelativePath =
            getTsFileRelativePath(
                recoverPerformer.getTsFileResource().getTsFile().getCanonicalPath());
        absolutePath2RecoverPerformer.put(tsFileRelativePath, recoverPerformer);
      } catch (IOException e) {
        logger.error(
            "Fail to add recover performer for file {}",
            recoverPerformer.getTsFileAbsolutePath(),
            e);
      }
    }
    return recoverPerformer.getRecoverListener();
  }
First set allVsgScannedLatch, then call recover method.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALRecoverManager.java