]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Don't enable modseqs on STATUS_HIGHESTMODSEQ.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 1 Nov 2016 10:43:03 +0000 (12:43 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 9 Nov 2016 12:14:21 +0000 (14:14 +0200)
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.

src/lib-storage/mail-storage.c

index 20925a0207447a33723b7f87279db86a7ce2da4d..8a6b6afcc1ee8f178b8785a325a58d1db62ec9b2 100644 (file)
@@ -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();
 }