And waits for them. That's pointless.
{
    {
        std::lock_guard lock(existing_nodes_cache_mutex);
        if (existing_nodes_cache.count(path))
            return true;
    }
    bool res = getZooKeeper()->exists(path);
    if (res)
    {
        std::lock_guard lock(existing_nodes_cache_mutex);
        existing_nodes_cache.insert(path);
    }
    return res;
}
std::optional<EphemeralLockInZooKeeper>