private synchronized String findPreviousSequentialNode(String path) throws KeeperException,
            InterruptedException {
        int lastSlashIdx = path.lastIndexOf('/');
        assert (lastSlashIdx != -1);
        String parent = path.substring(0, lastSlashIdx);
        String nodePrefix = path.substring(lastSlashIdx + 1);

        List<String> nodes = zk.getChildren(parent, false);
        List<String> matching = filterByPrefix(nodes, nodePrefix);
        for (String node : matching) {
            String nodePath = parent + "/" + node;
            Stat stat = zk.exists(nodePath, false);
            if (stat != null) {
                return nodePath;
            }
        }
        return null;
    }
NONSEQUENTIAL create is idempotent operation. Retry before throwing exceptions. But this
function will not throw the NodeExist exception back to the application. </p> <p> But
SEQUENTIAL is NOT idempotent operation. It is necessary to add identifier to the path to
verify, whether the previous one is successful or not. </p>

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