https://s3.amazonaws.com/clickhouse-test-reports/0/10dc83b7a9c18228c4a4fc0dcfe6b18d2427462e/stress_test__debug__actions_.html

I found weird exception while investigating why ephemeral nodes were not removed for a long time:
https://pastila.nl/?00ec9776/d8858e442f8453f9b9e31a2f1da3cc8b
{
    std::lock_guard lock(session_to_response_callback_mutex);
    
    if (response->xid != Coordination::WATCH_XID && response->getOpNum() == Coordination::OpNum::SessionID)
    {
        const Coordination::ZooKeeperSessionIDResponse & session_id_resp = dynamic_cast<const Coordination::ZooKeeperSessionIDResponse &>(*response);
        
        if (session_id_resp.server_id != server->getServerID() || !new_session_id_response_callback.contains(session_id_resp.internal_id))
            return;
        auto callback = new_session_id_response_callback[session_id_resp.internal_id];
        callback(response);
        new_session_id_response_callback.erase(session_id_resp.internal_id);
    }
    else 
    {
        auto session_response_callback = session_to_response_callback.find(session_id);
        
        if (session_response_callback == session_to_response_callback.end())
        {
            LOG_TEST(log, "Cannot write response xid={}, op={}, session {} disconnected", response->xid, response->getOpNum(), session_id);
            return;
        }
        session_response_callback->second(response);
        
        if (response->xid != Coordination::WATCH_XID && response->getOpNum() == Coordination::OpNum::Close)
        {
            session_to_response_callback.erase(session_response_callback);
        }
    }