Messages loaded from ofOffline are not sorted by time stamp leading to out-of-order receipt
Description
Environment
None
Activity
Show:
Daryl Herzmann November 18, 2016 at 4:46 PM
Testing with my patch
username | messageid | creationdate | messagesize |
stanza
----------+-----------+-----------------+-------------+-------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
loser2 | 336492 | 001479487559119 | 183 | <message type="chat" id=
"purpleec08b06d" to="loser2@laptop.local" from="loser1@laptop.local/1vmsniyxcs">
<active xmlns="http://jabber.org/protocol/chatstates"/><body>2</body></message>
loser2 | 336493 | 001479487559545 | 183 | <message type="chat" id=
"purpleec08b06e" to="loser2@laptop.local" from="loser1@laptop.local/1vmsniyxcs">
<active xmlns="http://jabber.org/protocol/chatstates"/><body>3</body></message>
loser2 | 336491 | 001479487558678 | 183 | <message type="chat" id=
"purpleec08b06c" to="loser2@laptop.local" from="loser1@laptop.local/1vmsniyxcs">
<active xmlns="http://jabber.org/protocol/chatstates"/><body>1</body></message>
loser2 logs in and gets...
(10:45:58 AM) loser1@laptop.local/1vmsniyxcs: 1
(10:45:59 AM) loser1@laptop.local/1vmsniyxcs: 2
(10:45:59 AM) loser1@laptop.local/1vmsniyxcs: 3
Daryl Herzmann November 18, 2016 at 4:39 PM
For example
select * from ofOffline where username = 'loser2';
username | messageid | creationdate | messagesize |
stanza
----------+-----------+-----------------+-------------+-------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
loser2 | 336328 | 001479486937836 | 183 | <message type="chat" id=
"purple10b7a130" to="loser2@laptop.local" from="loser1@laptop.local/1vppxvp1oc">
<active xmlns="http://jabber.org/protocol/chatstates"/><body>3</body></message>
loser2 | 336326 | 001479486936414 | 183 | <message type="chat" id=
"purple10b7a12e" to="loser2@laptop.local" from="loser1@laptop.local/1vppxvp1oc">
<active xmlns="http://jabber.org/protocol/chatstates"/><body>1</body></message>
loser2 | 336327 | 001479486937252 | 183 | <message type="chat" id=
"purple10b7a12f" to="loser2@laptop.local" from="loser1@laptop.local/1vppxvp1oc">
<active xmlns="http://jabber.org/protocol/chatstates"/><body>2</body></message>
(3 rows)
and then I log in as loser2 and get
(10:35:37 AM) loser1@laptop.local/1vppxvp1oc: 3
(10:35:36 AM) loser1@laptop.local/1vppxvp1oc: 1
(10:35:37 AM) loser1@laptop.local/1vppxvp1oc: 2
User notes that when they send messages to an offline user, that the order is not preserved when the user comes back online...
This appears to be a bug with LOAD_OFFLINE not sorting messages by timestamp