Open Bug 857003 Opened 7 years ago Updated 5 years ago

Mbox/cur directory size of maildirstore/IMAP/Offline-Use=On folder increases infinitely by simple/cyclic rename of Mbox. All of Mbox.msf file, Mbox directory, Mbox.sbd directory, should be deleted upon rename, unsubscribe, mbox delete at server

Categories

(MailNews Core :: Database, defect)

x86
Windows XP
defect
Not set

Tracking

(Not tracked)

People

(Reporter: World, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [maildir])

[Build ID]
> Mozilla/5.0 (Windows NT 5.1; rv:22.0) Gecko/20100101 Thunderbird/22.0a1
> Application Build ID : 20130325031104

Mbox/cur directory size of maildirstore/IMAP/Offline-Use=On folder increases infinitely by simple/cyclic rename of Mbox.

[Steps to reproduce]
(1) With maildirstore/IMAP, copy 3 mails to Offline-Use=On folder,
    called MboxA, one by one to avoid known bug.
    Open MboxA => Mbox/cur/n_1, n_2, n_3 
(2) Rename MboxA to MboxB.
    Required content in MboxA.msf is normaly copied to MboxB.msf.
    MboxB/cur is created.
    If Offline-Use=MboxB is set to Off, change to On.
    Open MboxB => Mbox/cur/n_4, n_5, n_6
    MboxA.msf is deleted.
    MboxA/cur is not touched by Tb. Kept as-is.
(3) Rename MboxB to MboxA, Oddline-Use=On if required, open MboxA.
    => MboxA/cur/n_1, n_2, n_3, n_7, n_8, n_9  
    MboxB.msf is deleted.
    MboxB/cur is not touched by Tb. Kept as-is.
(4) Rename MboxA to MboxB, Oddline-Use=On if required, open MboxB.
    => MboxB/cur/n_4, n_5, n_6, n_10, n_11, n_12 
    MboxA.msf is deleted.
    MboxA/cur is not touched by Tb. Kept as-is.
(5) Rename MboxB to MboxA, Oddline-Use=On if required, open MboxA.
    => MboxA/cur/n_1, n_2, n_3, n_7, n_8, n_9, n_13, n_14, n_15
    MboxB.msf is deleted.
    MboxB/cur is not touched by Tb. Kept as-is.
(6) Repeat "Rename MboxA=>MboxB" and "Rename MboxB=>MboxA"
    => size of MboxA/cut and MboxB/cur increases infinitely.
(7) Restart Tb. Unused MboxX directory is not touched by Tb, So Mbox? increases infinitely by cyclic rename.

IIRC, in berkleytore, file of unused Mbox?(Mbox? file of non-existent Mbox? at server) is deleted.
Similar "undeleted Mbox?.sbd" in berkleystore is also seen in maildirstore.

When Mbox is renamed, or Mbox is unsubscribed, or Mbox actually doens't exist at server(doen't exist in actually/fully returned in LSUB Mbox response, LIST Mbox response), all of Mbox.msf file, Mbox directory, Mbox.sbd should be deleted.
No longer depends on: 856532
Summary: Mbox/cur directory size of maildirstore/IMAP/Offline-Use=On folder increases infinitely by simple/cyclic rename of Mbox → When Mbox is renamed, or Mbox is unsubscribed, or Mbox doens't exist at server, all of Mbox.msf file, Mbox directory, Mbox.sbd directory should be deleted
Summary: When Mbox is renamed, or Mbox is unsubscribed, or Mbox doens't exist at server, all of Mbox.msf file, Mbox directory, Mbox.sbd directory should be deleted → Mbox/cur directory size of maildirstore/IMAP/Offline-Use=On folder increases infinitely by simple/cyclic rename of Mbox
Blocks: 857436
No longer blocks: 857436
See Also: → 857436
Depends on: 771643
Blocks: 859011
No longer blocks: maildirblockers
Summary: Mbox/cur directory size of maildirstore/IMAP/Offline-Use=On folder increases infinitely by simple/cyclic rename of Mbox → Mbox/cur directory size of maildirstore/IMAP/Offline-Use=On folder increases infinitely by simple/cyclic rename of Mbox. All of Mbox.msf file, Mbox directory, Mbox.sbd directory, should be deleted upon rename, unsubscribe, mbox delete at server
"Mbox.sbd and its content is not deleted upon rename Mbox" is not MailDirStore only phenomenon.
"Mbox.sbd and its content is not deleted upon rename Mbox" does occur on BerkleyStore IMAP Mbox.
however, if BerkleyStore IMAP Mbox, following occurs;
    Mbox.msf is renamed to MboxNew.msf, and file of Mbox is renamed to MboxNew if Offline-Use=On.
    Even if Mbox.sbd remained and even if Mbox.sbd is re-used by rename back from MboxNew to Mbox,
    garbage of XXX.msf and XXX file are re-created from scratch, or removed if XXX doesn't exist on imap server, upon folder re-discovery.
So, actual problem due to non-deleted Mbox.sbd won't occur if BerkleyStore, except when special case in edge case. Merey it's annoyng and confusing usually.
You need to log in before you can comment on or make changes to this bug.