-
I've checked and there is a problem with race condition as Session Manager uses getPacketFrom() for hashCodeForPacket used to determine queue to assign packet to. In this case many senders sends packets with diffrent "from" attribute and diffrent packetFrom as they use diffrent connections, and that creates race condition. Simplest solution would be to put whole read-modify-save in synchronized block, but it can create performance issues. Any other solutions for that?
Type |
Bug
|
Priority |
Normal
|
Assignee | |
RedmineID |
230
|
Version |
tigase-server-7.0.0
|
Estimation |
0
|
Issue Votes (0)
Watchers (0)
The section of this groovy script that updates a user's roster when he or she is offline first loads the entire roster. Then it updates the one relevant item in the roster. Finally, it saves the roster to the repository. When an offline user gets two friend requests at the same time, there is a timing window in which the first request gets lost if the second request loads the roster before the first request saves the roster.