Closed Bug 1802937 Opened 2 years ago Closed 2 years ago

Compacting inbox borks certain messages in open tabs

Categories

(Thunderbird :: Untriaged, defect)

Thunderbird 102
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 520115

People

(Reporter: mgoldey, Unassigned)

References

(Depends on 1 open bug)

Details

Steps to reproduce:

When multiple message tabs are open and the Inbox is compacted, upon completion, some of the open messages will be replaced by a different message from the inbox.

I know that this issue has been reported before going back at least several years, but I cannot find it in any bug report. I believe that I mentioned it in comments to other bugs, and that this is the same basic issue reported as blank message tabs resulting from compaction.

To see this behavior, open a half dozen messages in separate message tabs. Ideally, choose some very old ones and some very new ones. Then, delete a few messages from the time period in between the older and newer messages, and compact the Inbox. Once compaction completes, the tabs containing the newest messages will likely be replaced by another message, and that new message will be familiar because it is likely the message that is selected / open in the message pane (or that was selected when compaction kicked off).

I think I can reason out what is happening. Suppose that the Inbox contains 100 messages with index #s (references, pointers whatever it may be) from 0 to 99. Open messages 10, 50, 60 and 70. Then, delete message 55. Compact the Inbox.

The pointer or index for messages 10 and 50 remains unchanged because messages 0 through 54 are still there. Messages 60 and 70 now contain a new pointer, however, or now point to something that no longer exists, because the deleting message 55 plus compaction has changed the ordering of messages 56 though 99. (Message 99 is now message 98, so to speak).

Because messages 60 and 70 point to nothing, TB picks whatever message is highlighted in the message pane -- i.e., perhaps the most recent one, or the one that the user most-recently viewed. Some users used to report a blank message in the tab, but I think that was only long ago.

I don't know if this is literally how TB functions, but I have held open a very old message for several months with no problem, while newer messages routinely became the wrong message after compaction.

Expected results:

If I have the mechanics right, then what should happen is that, during compaction, TB notes any open messages and updates their pointer / index / whatever, so that after compaction it can still display the message that was open when compaction started.

Some possibilities https://mzl.la/3ufMNYv

Are you actually using version 105?

Flags: needinfo?(mgoldey)

52015 is perhaps the same underlying issue. The last bug I participated in actively involved gloda errors after compaction and high CPU rates as those error messages repeated endlessly. Same concept: the sqlite database referenced messages that no longer existed.

I just updated to 105.2.1 on the release update channel and I see "up to date".

I just compacted again with (1) a message from 2014 open in one tab, (2) the second most recent message open in a second, and (3) I don't recall which message highlighted. I had deleted 40 or 50 messages from the past 3 months.

After compaction, the 2014 message is fine, but the one from this morning has been replaced by the message immediately above it in the message list, which is the message that is now highlighted. The tab containing that message has lost its title.

Flags: needinfo?(mgoldey)

Ugh. Version 102.5.1 (32 bit). NOT 105. 102.

Thanks for checking

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Depends on: 520115
Duplicate of bug: 520115
Resolution: --- → DUPLICATE
Version: Thunderbird 105 → Thunderbird 102
You need to log in before you can comment on or make changes to this bug.