The default bug view has changed. See this FAQ.

Too many .msf file open with many third level folders and Show only subscribed folders unchecked/disabled

RESOLVED FIXED

Status

MailNews Core
Backend
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Boying Lu, Unassigned)

Tracking

({fixed-seamonkey2.0.4})

Trunk
fixed-seamonkey2.0.4

Thunderbird Tracking Flags

(thunderbird3.0 .4-fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
A use has many mail folders, when he launch thunderbird, he got an error which says that "too many files open". I found that user's .msf files are opened without closing.

Comment 1

7 years ago
Created attachment 430230 [details] [diff] [review]
proposed fix with unit test

This should fix the issue, which was that if you have subscription turned off, verifying the existence of sub-folders caused us to leave db's open. Writing the unit test for the fix exposed several other issues, which I've fixed, but I need to verify the fixes for tomorrow.
Assignee: nobody → bienvenu
Status: NEW → ASSIGNED
(Reporter)

Comment 2

7 years ago
I've got confirm from the user, the patch does fix the bug. Thanks

Comment 3

7 years ago
Created attachment 430388 [details] [diff] [review]
proposed fix with unit test

The main fix is to close the msg database after doing a list folder url. We only do this if imap subscription is turned off, so to make the unit test work, I had to fix an issue trying to turn off imap subscription - the prev attempt to move to frozen linkage continues to be the gift that keeps giving! And I noticed an unrelated issue introduced at the same time, so I fixed that as well.

The unit test creates a 4 level folder hierarchy, which causes us to ListFolders to verify existence.

I think there's a separate issue w/ escaping of folder uris in this mode, but fixing that is scary and shouldn't block this fix.
Attachment #430230 - Attachment is obsolete: true
Attachment #430388 - Flags: superreview?(neil)
Attachment #430388 - Flags: review?(neil)

Updated

7 years ago
Whiteboard: [has patch for review]

Updated

7 years ago
Attachment #430388 - Flags: superreview?(neil)
Attachment #430388 - Flags: superreview+
Attachment #430388 - Flags: review?(neil)
Attachment #430388 - Flags: review+

Comment 4

7 years ago
Comment on attachment 430388 [details] [diff] [review]
proposed fix with unit test

-  if (serverKey.IsEmpty())
+  if (!serverKey.IsEmpty())
Oh dear! (I don't know about the rest of the patch but even if it doesn't belong on the branch then I would have thought that these do.)

>+            if (!m_verifiedAsOnlineFolder)
The logic might be slightly easier to read if you either a) reversed this condition and switched the blocks or b) unconditionally cleared the database, assuming this won't have a detrimental effect on removing the subfolder.

Comment 5

7 years ago
fix checked in - I did unconditionally clear the database; that should be fine.

The serverKey empty stuff mostly just means we need to restart to change from subscription to non-subscription, or vice versa, afaict, so I don't think it's a huge deal.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
OS: Solaris → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1b2

Comment 6

7 years ago
Comment on attachment 430388 [details] [diff] [review]
proposed fix with unit test

I think the fix would be fine for 3.04, but not absolutely required. imap subscription is the default, and this patch only affects the case where you're not using imap subscription. That being said, a surprising number of users/enterprises turn off subscription, from what I can tell.
Attachment #430388 - Flags: approval-thunderbird3.0.4?
(Reporter)

Comment 7

7 years ago
User wants to get it fixed in 3.0.4, so I suggest to fix it in 3.0.4 if possible.
(In reply to comment #6)
> (From update of attachment 430388 [details] [diff] [review])
> I think the fix would be fine for 3.04, but not absolutely required. imap
> subscription is the default, a

Might this cause big performance issues similar to what has been fixed in other cases where dbs aren't closed?

And this is "show only subscribed folders"?
I have it unchecked :)  for reasons I no longer remember.
Assignee: bienvenu → nobody
Component: General → Backend
Product: Thunderbird → MailNews Core
QA Contact: general → backend
Target Milestone: Thunderbird 3.1b2 → ---

Comment 9

7 years ago
(In reply to comment #8)
> (In reply to comment #6)
> > (From update of attachment 430388 [details] [diff] [review] [details])
> > I think the fix would be fine for 3.04, but not absolutely required. imap
> > subscription is the default, a
> 
> Might this cause big performance issues similar to what has been fixed in other
> cases where dbs aren't closed?

Well, only with third level folders, and beyond, so of somewhat limited scope.
> 
> And this is "show only subscribed folders"?

This is if you don't have it checked. The default is that it should be checked...

> I have it unchecked :)  for reasons I no longer remember.

Some enterprise deployments tell there users to uncheck it, usually because they also deploy other apps that talk to the server (e.g., webmail) that don't maintain subscription.
Attachment #430388 - Flags: approval-thunderbird3.0.4? → approval-thunderbird3.0.4+

Comment 10

7 years ago
fixed for 3.0.4
status-thunderbird3.0: --- → .4-fixed

Updated

7 years ago
Keywords: fixed-seamonkey2.0.4
Summary: Too many .msf file open → Too many .msf file open with many third level folders and Show only subscribed folders unchecked/disabled
Whiteboard: [has patch for review]

Updated

7 years ago
Duplicate of this bug: 555655
You need to log in before you can comment on or make changes to this bug.