Comment 35 for bug 2060534

Revision history for this message
In , Omry Yadan (omry) wrote :

No, the problem here is not related to compacting a folder after deleting all the messages.
Good to hear you rewrote that code. Can you point to your diff?

A few points/ideas that would make things more robust (some mentioned above):
1. Diligent error handling while writing the tmp file.
2. Making sure that multiple processes/threads would not write to the same tmp file concurrently.
3. Always cleaning up compaction tmp files on error.
4. Clean up compaction tmp files on startup on case of an unclean shutdown during compaction.
5. Ensure that the number of written messages while compacting does not exceed the number of messages in the folder being compacted.