dovecot-2.2: doveadm sync: When -1 parameter is used, ignore mis...

dovecot at dovecot.org dovecot at dovecot.org
Sat Sep 21 03:49:42 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/0ec0dc639a54
changeset: 16794:0ec0dc639a54
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Sep 21 03:49:22 2013 +0300
description:
doveadm sync: When -1 parameter is used, ignore missing mailboxes in source.
Previously the syncs finished with "Mailbox changes caused a desync." and
exit code 2. This was especially common when the destination server had
new autocreated mailboxes and user logged in after the first dsync.

diffstat:

 src/doveadm/dsync/dsync-brain-mailbox.c |  10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r 2ce07adab319 -r 0ec0dc639a54 src/doveadm/dsync/dsync-brain-mailbox.c
--- a/src/doveadm/dsync/dsync-brain-mailbox.c	Sat Sep 21 03:40:46 2013 +0300
+++ b/src/doveadm/dsync/dsync-brain-mailbox.c	Sat Sep 21 03:49:22 2013 +0300
@@ -623,6 +623,16 @@
 	}
 	if (box == NULL) {
 		/* mailbox was probably deleted/renamed during sync */
+		if (brain->backup_send && brain->no_backup_overwrite) {
+			if (brain->debug) {
+				i_debug("brain %c: Ignore nonexistent "
+					"mailbox GUID %s with -1 sync",
+					brain->master_brain ? 'M' : 'S',
+					guid_128_to_string(dsync_box->mailbox_guid));
+			}
+			dsync_brain_slave_send_mailbox_lost(brain, dsync_box);
+			return TRUE;
+		}
 		//FIXME: verify this from log, and if not log an error.
 		if (brain->debug) {
 			i_debug("brain %c: Change during sync: "


More information about the dovecot-cvs mailing list