]> 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)
committerGitLab <gitlab@git.dovecot.net>
Tue, 1 Nov 2016 19:58:34 +0000 (21:58 +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 cac33f64fec437ef6395c366e84548128c8d294b..91ef088fd2aa62db71968e774fb30fccb3147886 100644 (file)
@@ -1666,8 +1666,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);
@@ -1682,8 +1680,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();
 }