private <T> T retry(IOSupplier<T> supplier, long retryIntervalMillis, long retryTimeoutMillis) throws IOException {
        long start = System.nanoTime();
        long retryTimeoutNanos = TimeUnit.MILLISECONDS.toNanos(retryTimeoutMillis);
        while (true) {
            try {
                return supplier.get();
            } catch (IOException e) {
                if (System.nanoTime() - start > retryTimeoutNanos) {
                    failed = true;
                    LOGGER.error("Failed to execute IO operation, retry timeout", e);
                    throw e;
                }
                checkFailed();
                LOGGER.warn("Failed to execute IO operation, retrying in {}ms, error: {}", retryIntervalMillis, e.getMessage());
                Threads.sleep(retryIntervalMillis);
            }
        }
    }
Flag to indicate if the WAL has failed.
It will be set to true if an IO operation fails continuously, and it will never be reset.
Any IO operation will fail immediately if this flag is true.
s3stream/src/main/java/com/automq/stream/s3/wal/util/AbstractWALChannel.java