From: marka@pobox.com (Mark Alexander)
Subject: [sup-talk] Possible problem with maildir ID generation
Date: Thu, 16 Apr 2009 15:05:59 -0700 [thread overview]
Message-ID: <a412e2a70904161505l3e1fdfc9l987013130b3f5ddd@mail.gmail.com> (raw)
I've been studying maildir.rb (and adding some debug code) while
trying to figure out my lost message problem. I think there may be a
problem with the way the internal message IDs are generated. The
make_id method glues together the file timestamp and size. But I
think this could lead to an out-of-order problem in the @ids array.
Consider two messages that arrive in the same second, but the second
message is smaller than the first. Because the message size makes up
the low seven (decimal) digits of the ID, the second message, even
though it arrived later, will have an ID that is less than the first
message.
Then suppose that sup polls the maildir directory after the first
message arrives, but before the second message arrives, and sets the
cur_offset to the ID of the first message. Then, the next time it
polls, it will see the second message, but because its ID is less than
that of the first message, it will appear before the first in the @ids
array after it is sorted. So then the each method will skip the
second message, because cur_offset (the ID of the first message) will
be found in @ids after it.
Does this scenario make sense? I have seen what appears to be one
instance of this happening, though I'm still watching closely and
adding more debugging code to make sure that it explains all of the
lost messages.
next reply other threads:[~2009-04-16 22:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 22:05 Mark Alexander [this message]
2009-04-21 14:00 ` William Morgan
2009-04-21 15:33 ` Mark Alexander
[not found] ` <20090428191822.GB10581@cabinet.hsd1.ma.comcast.net>
2009-04-28 23:29 ` Mark Alexander
2009-04-29 22:31 ` William Morgan
2009-04-29 22:39 ` William Morgan
[not found] ` <20090429233820.GA14143@cabinet.hsd1.ma.comcast.net>
2009-05-04 16:10 ` William Morgan
[not found] ` <20090504165224.GA15815@cabinet.hsd1.ma.comcast.net>
2009-05-04 17:24 ` Mark Alexander
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a412e2a70904161505l3e1fdfc9l987013130b3f5ddd@mail.gmail.com \
--to=marka@pobox.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox