After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676548 - imapx: imapx_untagged() shouldn't care about jobs
imapx: imapx_untagged() shouldn't care about jobs
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.4.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[imapx]
Depends on:
Blocks:
 
 
Reported: 2012-05-22 11:21 UTC by David Woodhouse
Modified: 2015-08-07 06:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2012-05-22 11:21:17 UTC
As discussed in https://bugzilla.gnome.org/show_bug.cgi?id=667725#c5 it is a design flaw for imapx_untagged() to care about the requests have been made to the server, and make decisions based on them.

The IMAP protocol is the way it is, and the information about the messages/mailboxes is *untagged*, for a reason.

We should just "eat" the state that we're told about, whether it be solicited or unsolicited, and amend our local data store to reflect the information we gained.

There is a need for *some* co-ordination, particularly in scan_changes (for non-QRESYNC) when we need to notice that a given message is now absent purely because we *don't* see it in the FETCH 1:* (UID FLAGS) responses.

But that's still not something that has to be handled in imapx_untagged(). It's enough just to put a 'last seen' marker on each message as we see it, then scan_changes can know that after its fetch is completed, any message which doesn't have an updated 'last seen' marker has gone from the mailbox and should be removed locally. All the logic can still be on the 'job' side, and imapx_untagged() knows nothing about the jobs.

Get this right, and we shouldn't need a thread for idle either.
Comment 1 Matthew Barnes 2013-09-05 12:00:46 UTC
I'm somewhat working toward this as a prerequisite for NOTIFY support.

Currently I have LIST and STATUS responses being processed independently of tagged commands, which allowed me to trivially use LIST-STATUS if available.
Comment 2 Milan Crha 2015-08-07 06:18:27 UTC
I changed the internals within bug #745545, thus I'm closing this.