[Dovecot] Replication protocol design

Tommi Virtanen tv at eagain.net
Tue Apr 29 19:13:07 EEST 2008


On Tue, Apr 29, 2008 at 02:59:52AM +0300, Timo Sirainen wrote:
> > 1. A mail arrives in server1
> > 2. User reads it (therefore the mail has a UID assigned)
> > 3. server2 gets isolated from server1
> > 4. A mail arrives at server2
> > 5. User logs in to server2 and reads it (therefore the mail has a UID 
> > assigned)
> > 6. server2 and server1 are connected again, and are told to sync

> If user is able to log into either server1 or server2 then there's
> really nothing that can be done to avoid seeing the same UID contain
> different messages. But I think in normal situations if a user is able
> to connect to either one of the servers, the servers should be able to
> connect to each others as well.

One specialization of "gets isolated" is "goes down", "crashes", etc.
That fulfills the above scenario; note nothing implies synchronicity.

But your answer of "old UIDs are removed, new ones chosen" does answer
the question. It does some have some "interesting" side effects,
though, like messages disappearing from INBOX and showing up again
soon after.

Note that replication really must handle the conflict at the same time
on both sides, giving the messages the same new UIDs, with no
deliveries interfering with that. Otherwise you get very silly
behavior.

You're gonna live through some interesting times.

-- 
:(){ :|:&};:


More information about the dovecot mailing list