]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
indexer: Log MAIL_ERROR_INTERRUPTED with info-level instead of error
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 3 Feb 2022 19:59:46 +0000 (20:59 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 22 Feb 2022 09:28:55 +0000 (09:28 +0000)
src/indexer/master-connection.c

index eeb7a04e2d9d85fb8dd24d6d8faf29009afa62b1..897e95d4fd9f53f8c33b1a0a108bbd61ac41a1ec 100644 (file)
@@ -141,9 +141,16 @@ index_mailbox_precache(struct master_connection *conn, struct mailbox *box)
                }
        }
        if (mailbox_search_deinit(&ctx) < 0) {
-               e_error(index_event, "Mail search failed: %s%s",
-                       mailbox_get_last_internal_error(box, NULL),
-                       get_attempt_error(counter, first_uid, last_uid));
+               enum mail_error error;
+               const char *errstr = mailbox_get_last_internal_error(box, &error);
+
+               if (error == MAIL_ERROR_INTERRUPTED) {
+                       e_info(index_event, "Mail search interrupted: %s%s", errstr,
+                              get_attempt_error(counter, first_uid, last_uid));
+               } else {
+                       e_error(index_event, "Mail search failed: %s%s", errstr,
+                               get_attempt_error(counter, first_uid, last_uid));
+               }
                ret = -1;
        }
        const char *uids = first_uid == 0 ? "" :