Jesse Norell wrote:
On Thu, 2008-06-12 at 23:54 +0100, Gordan Bobic wrote:
Paul J Stevens wrote:
I've probably asked this before however can someone remind me why mysql
master-master (innodb) replication is not recommend with dbmail?
It's not "recommended" with anything. By the very nature of it, there is
a potential very nasty race condition inherent in multi-master MySQL
replication. In practice you'd have to be extremely unlucky to encounter
it, but since there is no cluster-wide locking available in this setup,
it is a possibility. FWIW, I use it with multi-master replication. YMMV.
These conditions will not be very rare at all once you start putting
pressure on it.
But there is another reason in the imap requirements: UID values must be
strictly ascending within a mailbox.
Since these UID values are the autoincremented primary key on the
mailboxes table the only way to avoid collisions in the first place is
by stepping them differently on the separate masters, but doing that
will collide with the imap requirement I mentioned.
Hmm... I'll have to think about that case and try a few tests. Unless
there is a serious race condition encountered (which will only happen if
the same user has multiple simultaneous connections to separate
servers), I think the staggered auto-increments will still resolve
correctly (there will just be holes in the key-space, which I don't
think would cause problems).
I'm not saying it's a good idea, but I think the scope for a damaging
race condition is reasonably limited.
The issue, if I recall, is more that once the two servers come back
online, and the databases sync up again, messages that were delivered
(either via smtp or imap append) on the "other" server (that the user
wasn't connected to) could have a lower uid than what it's already seen,
so the client will never see or request those emails, and effectively
looses them. I think there was something with a uidvalidity call or
something that can trigger the client to reload the whole mailbox (don't
know if it's client or server-driven, etc.), which is less than optimal
with a large mailbox.
Sure, but this isn't really "losing" mail. It just means the client may
not see it unless the mailbox is fully refreshed. In case of the inbox,
I think this sort of thing may happen anyway (e.g. moving a message from
a different folder back into the inbox, or using difference clients from
different machines).
Gordan
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail