From: Timo Sirainen Date: Tue, 10 Nov 2020 17:57:26 +0000 (+0200) Subject: dsync: Incremental sync sometimes missed messages when GUIDs weren't available X-Git-Tag: 2.3.14.rc1~342 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68685ba62180b6ea9a19e36ab0616893d5e81d98;p=thirdparty%2Fdovecot%2Fcore.git dsync: Incremental sync sometimes missed messages when GUIDs weren't available GUIDs aren't available when using imapc, so this affected migrations. --- diff --git a/src/doveadm/dsync/dsync-mailbox-import.c b/src/doveadm/dsync/dsync-mailbox-import.c index fdc699ce53..b96a56008e 100644 --- a/src/doveadm/dsync/dsync-mailbox-import.c +++ b/src/doveadm/dsync/dsync-mailbox-import.c @@ -734,7 +734,7 @@ static void newmail_link(struct dsync_mailbox_importer *importer, } } else { if (remote_uid == 0) { - /* mail exists only locally. we don't want to request + /* mail exists locally. we don't want to request it, and we'll assume it has no duplicate instances. */ return; @@ -878,7 +878,7 @@ static bool dsync_mailbox_try_save_cur(struct dsync_mailbox_importer *importer, array_push_back(&importer->newmails, &newmail); newmail_link(importer, newmail, - save_change == NULL ? 0 : save_change->uid); + newmail->uid_in_local ? 0 : save_change->uid); return remote_saved; }