IMAP message flag changes not be seen when changed by another client after inactivity timeout
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(thunderbird_esr91 wontfix, thunderbird101+ fixed, thunderbird102+ fixed)
People
(Reporter: gds, Assigned: gds)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
3.41 KB,
patch
|
rjl
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
This a regression fix for the changes in bug 1708981 which I think is still in beta at this time and not in 91.
STR:
Start instance 1 of tb
Setup instance 1 to NOT check for email every X minutes.
Setup instance 1 to use imap IDLE (immediate)
Open a folder X and let TB just sit doing nothing for a long enough time for the server to disconnect. Typically this is about 30 minutes.
Start a new tb instance 2 for the same account and open the same folder X.
On instance 2 set a flag on any message in folder X, e.g., read/unread, star etc.
Note that the flag change is seen for the message in instance 2.
Note that the flag change is NOT seen for the message in instance 1 like it should.
This fails because m_imapMailFolderSinkSelected
is only set when the URL driving the activity is "select". A "select" URL does occur when you first click on a folder. But after an inactivity time-out and then if you just change a message flag on a visible message, the first URL on the new connection is "addmsgflag" so m_imapMailFolderSinkSelected
remains nullptr so the imap idle response is never handled.
The fix is to move the setting of m_imapMailFolderSinkSelected
into selectMailbox() where the imap SELECT is actually sent. This works because m_imapMailFolderSinkSelected
is only used in the imap selected state and imap SELECT is triggered by other URLs too, like addmsgflag, not just the select URL.
Assignee | ||
Comment 1•3 years ago
|
||
I've been running with this fix, along with other in-progress changes, for over a month now. But I haven't run just this change through try server yet.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
- m_imapMailFolderSinkSelected = nullptr;
Don't need this nullptr line - just assigning a new value will be fine.
I thought it might be needed to free memory pointed to by the old value, but I wasn't sure. I was hoping you could confirm or deny this. So you are saying that just assigning a new value is sufficient and no need to null it first so I can remove this line.
I do see the "sink" pointers set to nullptr when the thread exits or dies so I guess it's only needed then to free the memory.
Not sure about the MOZ_ASSERT. I haven't seen it fail but would "feel" better leaving it in if OK by you. It should only affect debug builds, I think.
I see some failures in the "try" build but it looks like other builds also failing the same tests.
Thanks!
Comment 4•3 years ago
|
||
Gene, what's next?
Assignee | ||
Comment 5•3 years ago
|
||
Sorry for the delay on this.
This just removes the not needed m_imapMailFolderSinkSelected = nullptr;
line as pointed out by reviewer Benc. I've been running with this patch since late Dec and haven't seen any problems or asserts so I'll go ahead and set the keyword to request landing since the original review was +.
Assignee | ||
Updated•3 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1072cb94b04e
IMAP flag changes not seen when changed by another client after inactivity timeout. r=benc
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•3 years ago
|
||
Comment on attachment 9276966 [details] [diff] [review]
1747173-fix-flag-changes-after-timeout.patch
[Triage Comment]
Approved for 101.0beta per wsmwk via Matrix
Comment 8•3 years ago
|
||
bugherder uplift |
Thunderbird 101.0b4:
https://hg.mozilla.org/releases/comm-beta/rev/7005a222ab2c
Description
•