-
-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duplicate entries in the mbnames file with autorefresh #467
Comments
Please check your |
Should I attach the file? $ ls -alh ~/.offlineimap/mbnames/interlink.json $ cat ~/.offlineimap/mbnames/interlink.json | jq -a '.[] | .foldername' | sort | uniq -c | sort -r | head -n3 $ cat ~/.offlineimap/mbnames/interlink.json | head -c 1000 |
No, it's ok. It's enough to know that the JSON file has the issue. Remove this file, it will be recreated on next run. Then, please track its content for some time in a per-run basis and report if the problem is still there. |
The json file is still growing at every syncing when offlinimap is run without Since |
Ok. I'm not surprised it's related to autorefresh. I'll check the code. |
mbnames is initialized and written once in the run from OfflineImap.__sync(). However, the in-memory instance is fed with data at sync time for each folder and the intermediate files are written as soon as all the folders are synced for the account. All of this is done inside the SyncableAccount.__sync() method while the syncrunner is looping on this. This means that we duplicate entries for mbnames in each loop (most likely when autorefresh is enabled). It is wrong to have duplicates in mbnames for each account. Ignore duplicates when adding data in the mbnames intermediate files. Github-ref: OfflineIMAP#467 Reported-by: Shin Kojima <shin@kojima.org> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
I could reproduce and fix this issue. Could you please try the above version and report if this fixes the issue for you? |
@nicolas33 Thanks, I confirmed that your patch fixes the issue. Confirmation process:
|
mbnames is initialized and written once in the run from OfflineImap.__sync(). However, the in-memory instance is fed with data at sync time for each folder and the intermediate files are written as soon as all the folders are synced for the account. All of this is done inside the SyncableAccount.__sync() method while the syncrunner is looping on this. This means that we duplicate entries for mbnames in each loop (most likely when autorefresh is enabled). It is wrong to have duplicates in mbnames for each account. Ignore duplicates when adding data in the mbnames intermediate files. Github-ref: #467 Reported-and-tested-by: Shin Kojima <shin@kojima.org> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Thank you much; patch applied. |
Hi, I'm using offlineimap installed from Homebrew.
I found my offlineimap frequently hangs and produces huge mbnames file.
I need to reboot the service to sync mails again.
Could you point me out what I missed? Thanks.
General informations
Configuration file offlineimaprc
pythonfile (if any)
The text was updated successfully, but these errors were encountered: