]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: If cache transaction lock fails because reset_id mismatch, compress cache
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 27 Mar 2020 16:07:53 +0000 (18:07 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 15 Apr 2020 09:41:42 +0000 (12:41 +0300)
This is also done in mail_cache_transaction_open_if_needed(), so it usually
worked anyway. But that function is otherwise unnecessary, so it's going
away in the next commit.

src/lib-index/mail-cache-transaction.c

index c48fa3a100284e8176b2f9cefaaad63bc184ef0e..83158d026c734196c740435effbb22d7eb3fadc3 100644 (file)
@@ -285,7 +285,7 @@ static int mail_cache_transaction_lock(struct mail_cache_transaction_ctx *ctx)
                if (ret < 0)
                        return -1;
 
-               if (!ctx->tried_compression && MAIL_CACHE_IS_UNUSABLE(cache)) {
+               if (!ctx->tried_compression) {
                        if (mail_cache_transaction_compress(ctx) < 0)
                                return -1;
                        return mail_cache_transaction_lock(ctx);