[Dovecot] New mailbox format

Geo Carncross geocar-dovecot at internetconnection.net
Tue Dec 6 18:48:40 EET 2005


On Tue, 2005-12-06 at 18:06 +0200, Timo Sirainen wrote:
> On Tue, 2005-10-04 at 10:38 -0400, Geo Carncross wrote:
> > Even UID generation can be performed without locks, although only in a
> > very IMAP-specific way.
> > 
> > [[this was covered on the dbmail mailing list a while back]]
> > 
> > I can pull up the references if anyone's interested.
> 
> Oh? I see this thread:
> http://mailman.fastxs.net/pipermail/dbmail-dev/2005-May/thread.html#6990
> and there you're saying it can't be done? (although I skipped most of
> the mails in the middle)

It turns out I was corrected later on:

http://mailman.fastxs.net/pipermail/dbmail-dev/2005-July/007204.html

The basic idea works when clients can't connect to both servers at the
same time _IF_ the servers cannot connect to each other.

Of course, if a particular CAN connect to each server without them being
able to contact each other _OR_ shares it's UID database with another
client that does using another channel, then messages could be missing
for a little but- but later on, they'll be duplicated.

Here's where I finally started to get it :)

http://mailman.fastxs.net/pipermail/dbmail-dev/2005-July/007231.html

It went on for a little bit while longer while some of the issues got
hashed out, collectively there's a coherent protocol in there:


* Servers make a distinction between which UIDs they generated, which
ones they got from someplace else, and which ones a client has seen.

* Each server has to step their UID generation (or get a pool ahead of
time) to avoid colliding with eachother- details about this step weren't
discussed much- suffice it to say, with a two node cluster, one takes
even UIDs and the other odd UIDs.

* UIDs are "fixed up" if they can appear out of order after consulting
the other nodes in the cluster: If a client has seen a fixed-up UID,
it's duplicated to a new (unseed) UID.

* Most of the time, servers are interconnected and can verify UID
numbers before assigning them to messages- only when that step fails
does anything "special" need to be done- and only when that step fails
AND SOME clients are still able to reach both nodes (via SMTP or via
IMAP) is it possible to need a fixup stage.


-- 
Internet Connection High Quality Web Hosting
http://www.internetconnection.net/



More information about the dovecot mailing list