From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits.
Date: Tue, 22 Jan 2008 21:20:16 -0800 [thread overview]
Message-ID: <1201065536-sup-7142@south> (raw)
In-Reply-To: <1201034511-sup-3452@tomsk>
Reformatted excerpts from Marcus Williams's message of 2008-01-22:
> :) Why do you use mtime + filesize rather than just the filename
> (before the colon) as the id? Other than the flags on files (after the
> colon) does this ever change?
Exactly the type of question man was not meant to ask.
The short answer is: because maildir filenames, while unique, are not
integers, and Sup needs integers.
The long answer is: in order to have a mailstore-format-indepedent way
of keeping track of messages that haven't been added to the index (as
opposed to messages which the mailstore thinks are unread, which is a
different question entirely), Sup uses message identifiers that are
unique, increasing, but not necessarily continguous, integers. Then Sup
can keep track of the last id that was added to the index for each
source, and polling consists of simply adding messages for which the id
is greater than the last id that Sup added from that source.
The other way to do this would be to have each source type maintain its
own logic for returning which messages hadn't been added to the index.
That could have been implemented by either pawing through the index upon
startup for each message (unacceptably slow for large mailstores), or by
maintaining a separate listing of added messages (probably very large
and seems a bit silly).
The terrible part about this solution, of course, is that Sup can't
uniquely represent two messages that have the same mtime and the same
size. One day I'm sure this will cause pain.
--
William <wmorgan-sup at masanjin.net>
next prev parent reply other threads:[~2008-01-23 5:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-18 8:58 Jeff Balogh
2008-01-22 3:03 ` William Morgan
2008-01-22 14:01 ` Jeff Balogh
2008-01-23 5:20 ` William Morgan
2008-01-22 20:44 ` Marcus Williams
2008-01-23 5:20 ` William Morgan [this message]
2008-01-23 9:59 ` Marcus Williams
2008-01-25 5:14 ` William Morgan
2008-01-27 20:07 ` Marcus Williams
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=1201065536-sup-7142@south \
--to=wmorgan-sup@masanjin.net \
/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