private synchronized void retryOrThrow(RetryCounter retryCounter, KeeperException e, String opName)
            throws KeeperException {
        logger.warn("Possibly transient ZooKeeper exception: ", e);
        if (!retryCounter.shouldRetry()) {
            logger.error("ZooKeeper " + opName + " failed after " + retryCounter.getMaxRetries()
                    + " retries");
            throw e;
        }
    }
exists is an idempotent operation. Retry before throwing exception

@return A Stat instance
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/zookeeper/RecoverableZooKeeper.java