]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Added more consistency when debug logging about changes during sync.
authorTimo Sirainen <tss@iki.fi>
Sat, 21 Sep 2013 00:40:46 +0000 (03:40 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 21 Sep 2013 00:40:46 +0000 (03:40 +0300)
src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c
src/doveadm/dsync/dsync-brain-mailbox.c
src/doveadm/dsync/dsync-mailbox-import.c

index b7d23d091ad5ba10a4712368e4e0ac6a7f05cef8..6f67b8a26f5733949bda4956749ecbd1f55422c1 100644 (file)
@@ -124,8 +124,8 @@ int dsync_brain_mailbox_tree_sync_change(struct dsync_brain *brain,
                }
                if (ret == 0) {
                        if (brain->debug) {
-                               i_debug("brain %c: Mailbox GUID %s sync: "
-                                       "Deletion conflict: %s",
+                               i_debug("brain %c: Change during sync: "
+                                       "Mailbox GUID %s deletion conflict: %s",
                                        brain->master_brain ? 'M' : 'S',
                                        mailbox_get_vname(box), errstr);
                        }
@@ -143,8 +143,8 @@ int dsync_brain_mailbox_tree_sync_change(struct dsync_brain *brain,
                if (error == MAIL_ERROR_NOTFOUND ||
                    error == MAIL_ERROR_EXISTS) {
                        if (brain->debug) {
-                               i_debug("brain %c: Mailbox %s sync: "
-                                       "mailbox_list_delete_dir conflict: %s",
+                               i_debug("brain %c: Change during sync: "
+                                       "Mailbox %s mailbox_list_delete_dir conflict: %s",
                                        brain->master_brain ? 'M' : 'S',
                                        mailbox_get_vname(box), errstr);
                        }
@@ -198,7 +198,8 @@ int dsync_brain_mailbox_tree_sync_change(struct dsync_brain *brain,
                        /* mailbox was already created or was already deleted.
                           let the next sync figure out what to do */
                        if (brain->debug) {
-                               i_debug("brain %c: Mailbox %s sync: %s conflict: %s",
+                               i_debug("brain %c: Change during sync: "
+                                       "Mailbox %s %s conflict: %s",
                                        brain->master_brain ? 'M' : 'S',
                                        mailbox_get_vname(box),
                                        func_name, errstr);
index a44154e895d0ac2c5221962f4682735f670a91c6..984ef03e660b3e9980fe10201a7b5ebc5f522bf9 100644 (file)
@@ -625,8 +625,8 @@ bool dsync_brain_slave_recv_mailbox(struct dsync_brain *brain)
                /* mailbox was probably deleted/renamed during sync */
                //FIXME: verify this from log, and if not log an error.
                if (brain->debug) {
-                       i_debug("brain %c: Mailbox GUID %s sync: "
-                               "Mailbox was lost during sync",
+                       i_debug("brain %c: Change during sync: "
+                               "Mailbox GUID %s was lost",
                                brain->master_brain ? 'M' : 'S',
                                guid_128_to_string(dsync_box->mailbox_guid));
                }
index 780139fa9bf0453fca3dba0782cb3e425df469d7..4084b48bae917580c9f2ed6abdff59accc842208 100644 (file)
@@ -2110,10 +2110,11 @@ reassign_uids_in_seq_range(struct dsync_mailbox_importer *importer,
                        mailbox_get_last_error(box, NULL));
                ret = -1;
        }
-       if (ret == 0 && importer->debug) {
-               i_debug("Mailbox %s: Renumbered %u of %u unwanted UIDs",
-                       mailbox_get_vname(box),
-                       renumber_count, array_count(unwanted_uids));
+       if (ret == 0) {
+               imp_debug(importer, "Mailbox %s: Change during sync: "
+                         "Renumbered %u of %u unwanted UIDs",
+                         mailbox_get_vname(box),
+                         renumber_count, array_count(unwanted_uids));
        }
        return ret;
 }