-
As per discussion, most likely majority of our issues recently were caused by packet's not being stamped correctly by
BindResource#preProcess
. We co removefrom
from the incoming packets in tigase.server.xmppclient.ClientConnectionManager#processSocketData as per specification but instead of stamping it already in CM we do it in SessionManager. Due to higher disconnection rate recently due to 'mobile-first' approach it may happen that certain packets would arrive to Session Manager after the session is gone and wouldn't be stamped correctly causing issues. Unfortunately due to current operation of (Default) Clustering strategy setting stanza from in CM is not possible (would cause duplications)After discussing this with @andrzej.wojcik I tackled the issue in two ways:
- I added additional check in
BindResource#preProcess
that would simply drop packets that arrive from Client Connection Manager with the missing session (as we can't process them properly in majority of cases either way) - thinking that this could still cause some problems (dropping packets acked by SM came to mind) I decided to temporarily extend
Packet
API withsetServerAuthorisedStanzaFrom
field that would hold authenticated user JID (that Connection Manager is already aware of) and would be used later on by BindResource pre-processor. Benefit of it would be even faster processing inBindResource#preProcess
(even less checks) and, after reviewing the APIs in 8.3.0/9.0.0 we can resolve the issue properly by setting stanzafrom
attribute directly in Connection Manager.
- I added additional check in
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Version |
Candidate for next minor release, tigase-server-8.2.0
|
Spent time |
0
|
We already had some packets that seemed to not be stamped with correct "from" in
tigase.xmpp.impl.BindResource#preProcess