From: Timo Sirainen Date: Sat, 21 Sep 2013 00:40:46 +0000 (+0300) Subject: dsync: Added more consistency when debug logging about changes during sync. X-Git-Tag: 2.2.6~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=311cbd9b1c81df050f5019600a2a809bc620be00;p=thirdparty%2Fdovecot%2Fcore.git dsync: Added more consistency when debug logging about changes during sync. --- diff --git a/src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c b/src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c index b7d23d091a..6f67b8a26f 100644 --- a/src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c +++ b/src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c @@ -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); diff --git a/src/doveadm/dsync/dsync-brain-mailbox.c b/src/doveadm/dsync/dsync-brain-mailbox.c index a44154e895..984ef03e66 100644 --- a/src/doveadm/dsync/dsync-brain-mailbox.c +++ b/src/doveadm/dsync/dsync-brain-mailbox.c @@ -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)); } diff --git a/src/doveadm/dsync/dsync-mailbox-import.c b/src/doveadm/dsync/dsync-mailbox-import.c index 780139fa9b..4084b48bae 100644 --- a/src/doveadm/dsync/dsync-mailbox-import.c +++ b/src/doveadm/dsync/dsync-mailbox-import.c @@ -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; }