unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Welsh Duggan <mwd@md5i.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Michael Welsh Duggan <mwd@md5i.com>, 56332@debbugs.gnu.org
Subject: bug#56332: 29.0.50; Large gnus imap groups; articles incorrectly marked as read (old)
Date: Sun, 03 Jul 2022 10:50:46 -0400	[thread overview]
Message-ID: <87o7y62qt5.fsf@md5i.com> (raw)
In-Reply-To: <87tu7ybgx8.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 03 Jul 2022 12:59:31 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Michael Welsh Duggan <mwd@md5i.com> writes:
>
>>> I will also note that, though the fetch data responses are not in order,
>>> the fetch completion messages are in order.  Though I'm not certain they
>>> have to be.  Here's some data from the Internet, though I can't find
>>> anything in the standard that seems to either confirm or refute this
>>> data:
>>>
>>> https://stackoverflow.com/questions/26034086/does-imap-guarantee-that-servers-send-responses-in-order
>>>
>>> Wouldn't another solution be to sort the results by UID?  They are being
>>> requested in UID order, after all.
>>
>> You should probably read this section of the RFC, especially the
>> "Note:".
>>
>> https://datatracker.ietf.org/doc/html/rfc3501#section-5.5
>
> Reading that, I'm not sure whether the completion messages are
> guaranteed to be in order, either, so I've now changed the code to avoid
> streaming altogether.  Can you check whether that fixes the problem?
>
> (If the completion messages are guaranteed to be in order, we could
> change it back to using streaming and then just reorder the results, as
> you suggest, but I'm not sure it's worth it even if it is guaranteed.)

As expected, I cannot cause a failure using this.  Though I will note
that there is no guarantee that a server will send its untagged fetch
responses in any particular order.  I will admit that it normally makes
very little sense for a server to actually do this in another order, but
I can conceive of two reasons that a server might do this, one of which
would probably not affect Gnus, but the other of which could:

1) If the messages were not requested in a sorted order, I could see
a server generating a sorted order anyway for internal implementation
reasons. (Not a problem for Gnus, since it will always request the
messages in sorted order.)

2) If messages were being retrieved from some sort of big-data
map-reduce store, the messages could conceivable come back in any order
due to messages being stored on different nodes with different
performance characteristics.  The server is not obligated to sort the
results before returning them.

That said, this fix will work for me for Dovecot and may work on all
existent or future IMAP servers, but I don't believe the standard
requires that this will be the case.

-- 
Michael Welsh Duggan
(md5i@md5i.com)





  reply	other threads:[~2022-07-03 14:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  6:47 bug#56332: 29.0.50; Large gnus imap groups; articles incorrectly marked as read (old) Michael Welsh Duggan
2022-07-01  9:36 ` Lars Ingebrigtsen
2022-07-01  9:50   ` Lars Ingebrigtsen
2022-07-01 15:54     ` Michael Welsh Duggan
2022-07-01 15:56       ` Michael Welsh Duggan
2022-07-02 12:00       ` Lars Ingebrigtsen
2022-07-02 14:30         ` Michael Welsh Duggan
2022-07-02 15:23           ` Lars Ingebrigtsen
2022-07-02 16:00             ` Michael Welsh Duggan
2022-07-02 16:40               ` Michael Welsh Duggan
2022-07-03 10:59                 ` Lars Ingebrigtsen
2022-07-03 14:50                   ` Michael Welsh Duggan [this message]
2022-07-04 10:49                     ` Lars Ingebrigtsen
2022-07-01 15:56   ` Michael Welsh Duggan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7y62qt5.fsf@md5i.com \
    --to=mwd@md5i.com \
    --cc=56332@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).