public static void flushDirIfExists(Path path) throws IOException {
        try {
            flushDir(path);
        } catch (NoSuchFileException e) {
            log.warn("Failed to flush directory {}", path);
        }
    }
Flushes dirty directories to guarantee crash consistency with swallowing {@link NoSuchFileException}

@throws IOException if flushing the directory fails.
clients/src/main/java/org/apache/kafka/common/utils/Utils.java