dovecot-2.2: dsync: If unexpected changes happen during sync, re...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 16 16:47:46 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/5a3586ffc644
changeset: 15781:5a3586ffc644
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 16 16:45:47 2013 +0200
description:
dsync: If unexpected changes happen during sync, return a safe last-common-uid for state.

diffstat:

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

diffs (15 lines):

diff -r e4aba707f867 -r 5a3586ffc644 src/doveadm/dsync/dsync-mailbox-import.c
--- a/src/doveadm/dsync/dsync-mailbox-import.c	Sat Feb 16 16:44:13 2013 +0200
+++ b/src/doveadm/dsync/dsync-mailbox-import.c	Sat Feb 16 16:45:47 2013 +0200
@@ -1819,6 +1819,11 @@
 			*changes_during_sync_r = TRUE;
 		}
 	}
+	if (*changes_during_sync_r) {
+		/* conflicting changes during sync, revert our last-common-uid
+		   back to a safe value. */
+		importer->last_common_uid = importer->local_uid_next - 1;
+	}
 	return ret;
 }
 


More information about the dovecot-cvs mailing list