private boolean checkHardLinkSourceFile(File source) {
    int retry = 10;
    while (!source.exists() && retry > 0) {
      LOGGER.warn(
          "Hard link source file {} doesn't exist, will retry for {} times...", source, retry);
      try {
        Thread.sleep(TimeUnit.SECONDS.toMillis(1));
      } catch (InterruptedException ignore) {
        Thread.currentThread().interrupt();
      }
      retry--;
    }
    if (!source.exists()) {
      File parent = source.getParentFile();
      LOGGER.error("Hard link source file {} doesn't exist, this file will be ignored.", source);
      String tryMsg = "Try to show all files in parent dir...";
      if (parent == null) {
        tryMsg += "Cannot show files because parent dir is null";
      } else {
        tryMsg += Arrays.toString(parent.listFiles());
      }
      LOGGER.error(tryMsg);
      return false;
    }
    return true;
  }
For "source file not exists" problem (jira787) debugging
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/SnapshotTaker.java