Use proper last_id files when syncing chats and when restoring chats#224
Use proper last_id files when syncing chats and when restoring chats#224gaubert merged 2 commits intogaubert:masterfrom
Conversation
instead of "email_last_id" (which breaks subsequent email and chat syncs)
email restore file
|
@adept looks good. oupps for the mistake. I did some quick tests but as I read the code everything seems ok. I will do more tests tomorrow and will accept the merge. |
Use proper last_id files when syncing chats and when restoring chats
|
@adept ok I made some tests and it is all fine. Merging now. Thanks for the fix |
|
don't know if anyway related but if I relay on last_id for subsequent mail syncs, last id is NOT highest id just a "random" number. therefore restarting the sync leads to duplicated mails. I've cases when something like 170 mails are duplicated at every sync (and I cron them every hour!) let me attach a log (log format slightly adjusted to fit my needs) of a case where duplicated mails are less (just to keep logs small) used version is v.1.9.1, accounts are corporate (google apps for business) sync at 7am local time (+2 UTC)
sync at 8am local time (same mail address, +2 UTC)
|
|
Both log snippets you provided list exactly same last_id. Do you have any idea why this is happening? |
|
yes: this is the last id stored into the .info folder. gmvault reloads the file and restarts downloading from that id. My guess is that ids are not well sorted: look at imap_id values: 479 is the last id but it is not the highest.
In the end I mean: last id is not most recent id. I'm rather busy on an internal project, don't know if I can allocate time to sort this out. sorry. Anyway I can do some tests on master if you think this would help! |
Currently chat sync and chat restore clobbers email last_id file, causing subsequent email operations to start from scratch.