Closed Bug 173399 Opened 22 years ago Closed 22 years ago

Compacting Folders before a compact is over leaves temp files around

Categories

(MailNews Core :: Backend, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: naving, Assigned: naving)

References

Details

(Whiteboard: [ish1+][fixedish1])

Attachments

(1 file)

To reproduce

1) Have a folder w/ 1000 of msgs. 
2) Delete some msgs
3) Compact Folders
4) Before step 3 is over, Do Compact Folders again

Expected result : No temp files around. Compact in step 4 complains of lock 

Actual result : temp files are left around but Compact in step 4 complains of 
lock 

patch coming up.
Attached patch proposed fixSplinter Review
The fix is to call CleanupTempFilesAfterError() before moving on to next
compact.
cc cavin and bienvenu for reviews ? thx.
Status: NEW → ASSIGNED
Summary: Compacting before a compact is over leaves temp files around → Compacting Folders before a compact is over leaves temp files around
sr=sspitzer

do we have to tweak any other callers of CleanupTempFilesAfterError()?

like 
http://lxr.mozilla.org/mozilla/source/mailnews/base/src/nsMsgFolderCompactor.cpp
#497?

just double checking with you that you don't need to fix the other callers.

fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assigning all "compact" related bugs to Esther. 
QA Contact: gayatri → esther
Keywords: adt1.0.2
Trunk only- I've tested this bug in today's trunk 20021011 on winxp and can't
reproduce the problem.  
Plussing for adt.  Need checkin by cob 10/16. Please make sure to get all
required  approvals (drivers) before checkin if this is not already done.
Keywords: adt1.0.2adt1.0.2+
Blocks: blackbird
Comment on attachment 102290 [details] [diff] [review]
proposed fix

a=chofmann for 1.0.2
Attachment #102290 - Flags: approval+
Comment on attachment 102290 [details] [diff] [review]
proposed fix

marking sr from sspitzer
Attachment #102290 - Flags: superreview+
fixed on branch
Keywords: fixed1.0.2
Whiteboard: [ish1+]
Using branch build 20021016 on winxp: 
1.) Clicking Compact Folders multiple times while compacting is in progress for
the Inbox = OK, I received the expected message: "The folder "xyz" cannot be
compacted because another operationis in progress.  Please try again later."  I
OK the error and compacting continues without losing msgs or corrupting the msf
file or without leaving temp files around.
2.) Clicking on Compact Folder multiple times while compacting of Inbox and 2
other  folders is in progress = OK, I received the expected message: "The folder
"xyz" cannot be compacted because another operationis in progress.  Please try
again later."  I OK the error and compaction continues.  I click Compact Folders
again while the compacting is still going on this time in another folder.  I get
the appropriate error msg.  I continue this until I don't get the error msg
anymore and then I check the folders that were compacted.  They are all OK. No
temp files left lying around.
3.) Clicking on OK for the automatic compact notice for POP account while POP
Inbox is getting messages.  I get the error notice, OK'ing it.  Result all
folders OK. No temp files left lying around.
4.) Clicking on OK for the automatic compact notice for POP account while IMAP
Inbox is getting messages.  =  OK. No temp files left lying around.

Still need to test on linux and mac before verifying.
erified on Mac 9.2 and linux using branch build 20021017, changing keyword to
verified1.0.2 and marking verified since it was tested on the trunk and branch
Status: RESOLVED → VERIFIED
Whiteboard: [ish1+] → [ish1+][fixedish1]
Product: MailNews → Core
This bug has reappeared in both Thunderbird(latest version as of 4/1/05) and
Mozilla Suite (1.7.6 - latest version as of 4/1/05).  Again, those folders that
have 1000s of messages are being duplicated/copied into NSTMP folders that
appear whenever a compact is performed while something else is going on.  In
this case, they appeared when a compact was happening when the mail was
downloading (as happens with automatic scheduled checks sometimes.)

Please retest with:
Win XP
latest versions
lots o' msgs in sent/trash/inbox

Thanks,
Lucien
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: