dovecot-2.2: indexer-worker: Added missing error logging.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Mar 9 14:17:51 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/00d40bf9c289
changeset: 18312:00d40bf9c289
user: Timo Sirainen <tss at iki.fi>
date: Mon Mar 09 16:17:08 2015 +0200
description:
indexer-worker: Added missing error logging.
diffstat:
src/indexer/master-connection.c | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r c28d8e2ae6a9 -r 00d40bf9c289 src/indexer/master-connection.c
--- a/src/indexer/master-connection.c Mon Mar 09 15:32:23 2015 +0200
+++ b/src/indexer/master-connection.c Mon Mar 09 16:17:08 2015 +0200
@@ -68,10 +68,17 @@
int ret = 0;
if (mailbox_get_metadata(box, MAILBOX_METADATA_PRECACHE_FIELDS,
- &metadata) < 0 ||
- mailbox_get_status(box, STATUS_MESSAGES | STATUS_LAST_CACHED_SEQ,
- &status) < 0)
+ &metadata) < 0) {
+ i_error("Mailbox %s: Precache-fields lookup failed: %s",
+ mailbox_get_vname(box), mailbox_get_last_error(box, NULL));
return -1;
+ }
+ if (mailbox_get_status(box, STATUS_MESSAGES | STATUS_LAST_CACHED_SEQ,
+ &status) < 0) {
+ i_error("Mailbox %s: Status lookup failed: %s",
+ mailbox_get_vname(box), mailbox_get_last_error(box, NULL));
+ return -1;
+ }
seq = status.last_cached_seq + 1;
trans = mailbox_transaction_begin(box, MAILBOX_TRANSACTION_FLAG_NO_CACHE_DEC);
@@ -99,10 +106,16 @@
counter, max);
}
}
- if (mailbox_search_deinit(&ctx) < 0)
+ if (mailbox_search_deinit(&ctx) < 0) {
+ i_error("Mailbox %s: Mail search failed: %s",
+ mailbox_get_vname(box), mailbox_get_last_error(box, NULL));
ret = -1;
- if (mailbox_transaction_commit(&trans) < 0)
+ }
+ if (mailbox_transaction_commit(&trans) < 0) {
+ i_error("Mailbox %s: Transaction commit failed: %s",
+ mailbox_get_vname(box), mailbox_get_last_error(box, NULL));
ret = -1;
+ }
if (ret == 0) {
i_info("Indexed %u messages in %s",
counter, mailbox_get_vname(box));
More information about the dovecot-cvs
mailing list