Open Bug 1512080 Opened 1 year ago Updated 3 months ago

MailDir Repair folder in IMAP causes folder contents to be deleted

Categories

(MailNews Core :: Database, defect)

defect
Not set

Tracking

(Not tracked)

People

(Reporter: unicorn.consulting, Unassigned, NeedInfo)

References

Details

(Keywords: perf)

Attachments

(2 files)

Attached image Activity manager..png
I noticed that my Gmail Maildir account was showing duplicate messages in the folder pane.  It also showed some 133,000 messages in the folder.

I right click the the folder,  selected properties and then the repair button.

Result:
Considerable disk noise as I/O ramped up on my slow disk and in due course Thunderbird reported the repair window as unresponsive.
Eventually the process complete with a report that the folder contained no messages.
Examination of the user profile shows no inbox folder in the folders for the account. 

On next get mail (just regular, not requested) the entire inbox folder reappeared in the profile folder and Thunderbird reported it was downloading some 286 thousand messages in the inbox folder.

At the time of filing the download has not yet completed.

Expected Result:
Re-index of the folder.

Attachment show the huge disparity in what is reported inthe status bar and the activity manager for this event.
Attached image status line
Interestingly as the download continues the number total in the status line continues to increase. 301,000+ and rising. And apparently some 50,000 in the all mail folder as well.
Component: General → Database
Product: Thunderbird → MailNews Core
After some hours both the activity manager and status bar have settled on 133652 messages to download.  Having downloaded less than 10,000 it is going to take some time to recover from this repair folder.
Maybe Ben can take a look.
Flags: needinfo?(benc)
Flags: needinfo?(benc)

related to bug 1412779 ?

Is this fundamentlaly a maildir issue?
Or just more general?

Flags: needinfo?(unicorn.consulting)
Flags: needinfo?(benc)
Keywords: perf

AFAIK it is maildir specific, I use repair on my local folders without any issue, but you are correct, I just tried repairing an IMAP folder with GMX and it downloading messages 1 to 102. SO I think it is a general IMAP issue, not maildir specific as I had assumed.

Flags: needinfo?(unicorn.consulting)

(In reply to Matt from comment #6)

AFAIK it is maildir specific, I use repair on my local folders without any issue, but you are correct, I just tried repairing an IMAP folder with GMX and it downloading messages 1 to 102. SO I think it is a general IMAP issue, not maildir specific as I had assumed.

My observation is that "repair" of an imap folder either re-downloads just the headers (if folder has no offline store) or the full messages (if folder does have offline store). So repairing an imap folder with 100k message and maildir or mbox offline store may take a while. (But not sure if this is a part of this issue.)

You need to log in before you can comment on or make changes to this bug.