]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Add more debug logging
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 16 Jun 2022 07:57:15 +0000 (10:57 +0300)
committerMarkus Valentin <markus.valentin@open-xchange.com>
Thu, 16 Jun 2022 10:43:48 +0000 (12:43 +0200)
src/doveadm/dsync/dsync-mailbox-import.c

index 6cc23b85c2acc7905c924669565412e90350b976..08f2f26ad4a9ff4986340e1970835f39f4367faa 100644 (file)
@@ -1741,12 +1741,20 @@ dsync_mailbox_find_common_uid(struct dsync_mailbox_importer *importer,
                }
                if (ret > 0) {
                        importer->last_common_uid = change->uid;
+                       imp_debug(importer, "Last UID matched - "
+                                 "last_common_uid=%u",
+                                 importer->last_common_uid);
                } else if (!importer->revert_local_changes) {
                        /* mismatch - found the first non-common UID */
+                       imp_debug(importer, "Last UID mismatch - "
+                                 "last_common_uid=%u",
+                                 importer->last_common_uid);
                        dsync_mailbox_common_uid_found(importer);
                } else {
                        /* mismatch and we want to revert local changes -
                           need to delete the mailbox. */
+                       imp_debug(importer, "Last UID %u mismatch - "
+                                 "revert local changes", change->uid);
                        dsync_mailbox_revert_existing_uid(importer, change->uid, *result_r);
                }
                return;