What's happening is: 1. the messages is recorded in the database 2. the messages is sent to the server 3. compacting begins, this blocks retrieving messages from the server 4. compacting ends 5. the message is retrieved from the server, but not stored in the mbox file You can see this happening by running comment 21's STR with `MOZ_LOG=IMAP:4,compact:5` environment variables. I think 1 is done as an optimisation so that moving messages appears to happen quickly. I think 5 doesn't store the retrieved message because the code to do so has a the old (pre-compact) file handle. We should confirm and fix this. Additionally, I don't think that add-ons should be calling for folders to be compacted, unless that is what the add-on's purpose is. Surely there is a better way to solve the problem.
Bug 1909111 Comment 51 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
What's happening is: 1. the message is recorded in the database 2. the message is sent to the server 3. compacting begins, this blocks retrieving messages from the server 4. compacting ends 5. the message is retrieved from the server, but not stored in the mbox file You can see this happening by running comment 21's STR with `MOZ_LOG=IMAP:4,compact:5` environment variables. I think 1 is done as an optimisation so that moving messages appears to happen quickly. I think 5 doesn't store the retrieved message because the code to do so has a the old (pre-compact) file handle. We should confirm and fix this. Additionally, I don't think that add-ons should be calling for folders to be compacted, unless that is what the add-on's purpose is. Surely there is a better way to solve the problem.