# HG changeset patch # User Timo Sirainen # Date 1379724046 -10800 # Node ID 2ce07adab319ac9210517a23f6fdab69af5e7d88 # Parent 4a969a2e9399c6e3c686fb2ecd2401f85a04b698 dsync: Added more consistency when debug logging about changes during sync. diff -r 4a969a2e9399 -r 2ce07adab319 src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c --- a/src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c Sat Sep 21 03:29:09 2013 +0300 +++ b/src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c Sat Sep 21 03:40:46 2013 +0300 @@ -124,8 +124,8 @@ } 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 @@ 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 @@ /* 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 -r 4a969a2e9399 -r 2ce07adab319 src/doveadm/dsync/dsync-brain-mailbox.c --- a/src/doveadm/dsync/dsync-brain-mailbox.c Sat Sep 21 03:29:09 2013 +0300 +++ b/src/doveadm/dsync/dsync-brain-mailbox.c Sat Sep 21 03:40:46 2013 +0300 @@ -625,8 +625,8 @@ /* 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 -r 4a969a2e9399 -r 2ce07adab319 src/doveadm/dsync/dsync-mailbox-import.c --- a/src/doveadm/dsync/dsync-mailbox-import.c Sat Sep 21 03:29:09 2013 +0300 +++ b/src/doveadm/dsync/dsync-mailbox-import.c Sat Sep 21 03:40:46 2013 +0300 @@ -2110,10 +2110,11 @@ 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; }