On Mon, 3 May 2010, Timo Sirainen wrote:
1) If mbox file's mtime and size match

Perhaps that works better today than 20 years ago.  Back then, you could
not trust mtime to reflect reality in any reasonable way particularly when
NFS was involved.  The most common circumstance is that mtime simply
wasn't updated.  This happened even with local files.  The explanation
that I got at the time was that it was somehow "inefficient" to keep the
mtime reliably up to date.

UW imapd doesn't trust mtime for any purpose, and takes a big hurt for
that.

3) If file size decreases, assume expunged messages -> re-read entire
mbox file.

This is reasonable if you have UIDs in the file (which of course is the
case today) since that allows you to resynchronize nicely.  In fact,
that's excactly how mix resynchronization works.

Back in the day, there was no good way for UW imapd to resynchronize in
this case.  Oh, it could have done an MD5 checksum of each message, but...

7) Writing flag changes (and other header updates) to mbox file are
optionally delayed (default), until mailbox is closed or messages are
expunged or CHECK is run. This is same as with UW-IMAP I think.

Yes.

Also as long as Dovecot is the only thing modifying the mbox file, state
is shared via index files, so 1) check always succeeds and the
performance stays good.

Those three things: being able to trust mtime, index files, and the
ability to resynchronize, are the big things in Dovecot.  For various
reasons those very things weren't feasible in the day (now nearly 20 years
ago) when UW IMAP's mbox code was first written; and when it became
feasible it was done in more modern formats (first mbx, then mix).

Filesystems are also beginning to support micro/nanosecond mtime
resolution

Long overdue!!

It should work pretty well as long
as fcntl locking is used, because it reliably also clears NFS caches
(hoping of course that nfs.lockd itself doesn't break).

That's a big hope; and in my experience a futile one.  I used to be able
to tell when SUN broke my test for NFS (and thus not use fcntl locks) when
I would get reports of cluster-wide hangs on Solaris boxes.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to