Hi Maxim,

I found this fix from you:

Server s = clientSessionInfo.getServerId() != null ?
serverDao.get(clientSessionInfo.getServerId()) : null;
            if (s != null) {
                // no need to sync on slave if server is null
                clusterSlaveJob.syncMessageToClientOnSlave(s,
clientSessionInfo.getRcl().getPublicSID() , message);
            }

What should that mean and what enhancements should it bring?

Actually if server == null it means that the client is handled on the same
server.
Basically on a slave ALL sessions have the server == null, because from the
perspective of the slave every session is locally. In fact the slave does
not even know that he is a slave. He handles every connection as if there
is no difference.

So why should the slave NOT sync that message ? That makes no sense to me.

Server == null is a correct implementation and it should not throw any
NullPointerException.
It simply means that the Session is local and not on another server.
Actually only this kind of session could have a s != null:
A session that is synced from the slave to the master. The master would
have this session with a Server != null.

So your comment does not makes sense to me.
Of course slaves do sync messages. On the slave the "server" argument is
_always_ null. But of course the slave should still sync that message.

Sebastian


-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
[email protected]

Reply via email to