dovecot-2.2: dsync: Added more consistency when debug logging ab...

dovecot at dovecot.org dovecot at dovecot.org
Sat Sep 21 03:41:07 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/2ce07adab319
changeset: 16793:2ce07adab319
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Sep 21 03:40:46 2013 +0300
description:
dsync: Added more consistency when debug logging about changes during sync.

diffstat:

 src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c |  11 ++++++-----
 src/doveadm/dsync/dsync-brain-mailbox.c           |   4 ++--
 src/doveadm/dsync/dsync-mailbox-import.c          |   9 +++++----
 3 files changed, 13 insertions(+), 11 deletions(-)

diffs (68 lines):

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;
 }


More information about the dovecot-cvs mailing list