From: Timo Sirainen Date: Tue, 1 Nov 2016 10:43:03 +0000 (+0200) Subject: lib-storage: Don't enable modseqs on STATUS_HIGHESTMODSEQ. X-Git-Tag: 2.2.27~244 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aef7a714d729271b7b644c69abcedf2735825e28;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Don't enable modseqs on STATUS_HIGHESTMODSEQ. This is requested always by IMAP's SELECT command even when the IMAP client hasn't requested it. We don't want to unnecessarily enable modseqs that use up memory and disk space when they're not really needed. Other callers may also be interested in asking for HIGHESTMODSEQ (which is nowadays actually always available) without enabling full modseq tracking. --- diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index 20925a0207..8a6b6afcc1 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -1665,8 +1665,6 @@ int mailbox_get_status(struct mailbox *box, if (mailbox_verify_existing_name(box) < 0) return -1; - if ((items & STATUS_HIGHESTMODSEQ) != 0) - mailbox_enable(box, MAILBOX_FEATURE_CONDSTORE); if (box->v.get_status(box, items, status_r) < 0) return -1; i_assert(status_r->have_guids || !status_r->have_save_guids); @@ -1681,8 +1679,6 @@ void mailbox_get_open_status(struct mailbox *box, i_assert((items & MAILBOX_STATUS_FAILING_ITEMS) == 0); mailbox_get_status_set_defaults(box, status_r); - if ((items & STATUS_HIGHESTMODSEQ) != 0) - mailbox_enable(box, MAILBOX_FEATURE_CONDSTORE); if (box->v.get_status(box, items, status_r) < 0) i_unreached(); }