Closed Bug 1724122 Opened 3 years ago Closed 3 years ago

nsMsgDBFolder::GetFolderCacheKey() has an option to create a missing database (.msf) file. It really shouldn't.

Categories

(MailNews Core :: Database, task)

Tracking

(thunderbird91 wontfix)

RESOLVED FIXED
92 Branch
Tracking Status
thunderbird91 --- wontfix

People

(Reporter: benc, Assigned: benc)

References

Details

Attachments

(1 file)

Somewhere along the line, nsMsgDBFolder::GetFolderCacheKey() was given a createDBIfMissing parameter. If set, GetFolderCacheKey() will create the .msf file if it doesn't exist. Unless it's the root folder.

This complicating side effect is only used by one call, in nsMsgDBFolder::ReadDBFolderInfo(). So I think it makes sense to move the create-a-missing-db hack out to there, with an eye on getting rid of it completely.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/9dfb49e36087
remove createDBIfMissing param from nsMsgDBFolder::GetFolderCacheKey(). r=mkmelin

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Are you aware of bug 1551173 comment #21? Under some yet unknown catastrophic circumstances MSF appear to be removed at times. Then the code you just moved creates invalid zero-byte files by the thousands which are later rebuilt by other parts of processing. Creating invald MSF files should be removed altogether. It papers over the catastrophic circumstances which so far no one has been able to track down, since when those invalid replacements are created, it's too late.

Flags: needinfo?(benc)

(In reply to José M. Muñoz from comment #3)

Are you aware of bug 1551173 comment #21? Under some yet unknown catastrophic circumstances MSF appear to be removed at times. Then the code you just moved creates invalid zero-byte files by the thousands which are later rebuilt by other parts of processing. Creating invald MSF files should be removed altogether. It papers over the catastrophic circumstances which so far no one has been able to track down, since when those invalid replacements are created, it's too late.

Ahh, thanks for that! I did think that the create-an-empty-db-file hack was a bit bonkers. I kept it in there because I figured it had been placed there to fix something in the past, even if I couldn't figure out what that was.
But given that the hack predates the mercurial history, I'm inclined think we should just be bold and ditch it now. I shall do that.

Flags: needinfo?(benc)

I guess you need to understand what bug 244217 was about.

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

Attachment

General

Creator:
Created:
Updated:
Size: