From cf471fd4d39b8a7cad6ac892cca55b7d6f0700a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martti=20Rannanj=C3=A4rvi?= Date: Thu, 28 Jun 2018 00:05:26 +0300 Subject: [PATCH] indexer: Don't log mailbox was deleted under us error --- src/indexer/master-connection.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/indexer/master-connection.c b/src/indexer/master-connection.c index 18e448171c..5b4c7ab63c 100644 --- a/src/indexer/master-connection.c +++ b/src/indexer/master-connection.c @@ -56,6 +56,8 @@ index_mailbox_precache(struct master_connection *conn, struct mailbox *box) struct mail_storage *storage = mailbox_get_storage(box); const char *username = mail_storage_get_user(storage)->username; const char *box_vname = mailbox_get_vname(box); + const char *errstr; + enum mail_error error; struct mailbox_status status; struct mailbox_transaction_context *trans; struct mail_search_args *search_args; @@ -122,11 +124,11 @@ index_mailbox_precache(struct master_connection *conn, struct mailbox *box) const char *uids = first_uid == 0 ? "" : t_strdup_printf(" (UIDs %u..%u)", first_uid, last_uid); if (mailbox_transaction_commit(&trans) < 0) { - i_error("Mailbox %s: Transaction commit failed: %s" - " (attempted to index %u messages%s)", - mailbox_get_vname(box), - mailbox_get_last_internal_error(box, NULL), - counter, uids); + errstr = mailbox_get_last_internal_error(box, &error); + if (error != MAIL_ERROR_NOTFOUND) + i_error("Mailbox %s: Transaction commit failed: %s" + " (attempted to index %u messages%s)", + mailbox_get_vname(box), errstr, counter, uids); ret = -1; } else { i_info("Indexed %u messages in %s%s", -- 2.47.3