Am Freitag, 27. August 2021, 13:12:44 CEST schrieb Sam Whited: > Thanks JC! > > You're right, I should have mentioned gaps. It's still possible to > have them in a desktop client because it could always close before it > finishes paging through catching up on history. I had planned to solve > that by either switching to committing the entire query in one > transaction, or changing from using the last message for the sync > query to using a separate "last message pointer" that gets updated > only after the entire transaction is over.
In Monal we have this "last message pointer", too, but update it every time a new raw stanza comes in (e.g. also for "live" messages AND mam-catchup messages). If the app gets killed in between processing a mam page, we just start our mam catchup from this point going forward (or continue the old mam query as if nothing happened, if the XEP-0198 session was still resumable). Each incoming stanza lives in its own db transaction (including the update to the XEP-0198 counters), making it possible to resume processing of a half processed stanza when resuming the XEP-0198 session. --> you can kill and restart the app as often as you like without ever loosing messages (as long as I did not make any implementation errors, of course). - tmolitor _______________________________________________ Standards mailing list Info: https://mail.jabber.org/mailman/listinfo/standards Unsubscribe: [email protected] _______________________________________________
