Patrick Schoenfeld
2011-Jan-21 15:15 UTC
[Dovecot] Does dsync handle client-side deletions?
Hi there, I'm currently evaluating the idea of a multi-master setup where each node shall hold a full copy of the mailboxes. Basically the idea is to use NFS and dsync to keep those copies in sync. So I did some tests with dsync and ran into a problem. Consider the following scenario: 1) Location1 and Location2 are in sync 2) A mail gets deleted on Location1 (via IMAP) 3) dsync mirror run to sync the two locations Expected behaviour: dsync notices that the mail was deleted on Location1 and also deletes it on Location2 to get the locations in sync. What I experience, however, is: dsync notices that the mail is missing on Location2 and copies it from Location1 to get the locations in sync. (At least) In debug mode it will spit a warning: dsync(test2): Info: INBOX: highest_modseq changed: 8 != 11 dsync(test2): Info: INBOX: Couldn't keep all uids dsync(test2): Info: INBOX: Ignored 1 modseq changes dsync(test2): Warning: Mailbox changes caused a desync. You may want to run dsync again. Now the question is: Doesn't dsync handle deletions or is there something I missed? Dovecot version is 2.0.9. Thanks in advance and best Regards, Patrick
On Fri, 2011-01-21 at 16:15 +0100, Patrick Schoenfeld wrote:> 1) Location1 and Location2 are in sync > 2) A mail gets deleted on Location1 (via IMAP)Via Dovecot v2.0 IMAP? What mailbox format? You haven't disabled index files, right?> 3) dsync mirror run to sync the two locations > > Expected behaviour: > dsync notices that the mail was deleted on Location1 and also deletes > it on Location2 to get the locations in sync.Yes, this should happen.> What I experience, however, is: > dsync notices that the mail is missing on Location2 and copies it > from Location1 to get the locations in sync.This shouldn't happen. Although I've heard that this actually does happen randomly and I haven't really debugged it much yet. But it should be a rare occurrence, not reproducible. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20110121/b4e8bd4f/attachment-0002.bin>
Patrick Schoenfeld
2011-Jan-21 20:31 UTC
[Dovecot] Does dsync handle client-side deletions?
Hi, thanks for the quick response. On Fri, Jan 21, 2011 at 07:21:44PM +0200, Timo Sirainen wrote:> On Fri, 2011-01-21 at 16:15 +0100, Patrick Schoenfeld wrote: > > > 1) Location1 and Location2 are in sync > > 2) A mail gets deleted on Location1 (via IMAP) > > Via Dovecot v2.0 IMAP?Yes.> What mailbox format? You haven't disabled index > files, right?Mailbox format is Maildir. I haven't disabled index files, at least not knowingly. Basically I'm using a default configuration, based on whats delivered with the Debian snapshot package of dovecot2 (from what I can tell, this is doc/example-config/* in the source tarball) with the neccessary changes to authenticate against a LDAP server. However, from a look at the maildirs I cannot find a main index file as described in [1], only the two other indexes. <hostname>:/var/spool/mail1/test2/Maildir# ls -l *index* -rw------- 1 vmail root 17408 21. Jan 21:12 dovecot.index.cache -rw------- 1 vmail root 2080 21. Jan 21:12 dovecot.index.log Is that normal?> > What I experience, however, is: > > dsync notices that the mail is missing on Location2 and copies it > > from Location1 to get the locations in sync. > > This shouldn't happen. Although I've heard that this actually does > happen randomly and I haven't really debugged it much yet. But it should > be a rare occurrence, not reproducible.In my current setup its reproducible. Note: This is dovecot 2.0 on Debian Lenny. Best Regards, Patrick [1] http://wiki2.dovecot.org/IndexFiles