]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Change max cache file size from 4 GB to 1 GB
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 10 Feb 2020 15:55:13 +0000 (17:55 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 14 Feb 2020 08:42:53 +0000 (08:42 +0000)
Over 1 GB sizes already weren't working correctly, because
mail_index_uint32_to_offset() assert-crashes on >=1 GB sizes.

Fixes:
Panic: file mail-index-util.c: line 37 (mail_index_uint32_to_offset): assertion failed: (offset < 0x40000000)

src/lib-index/mail-index.c

index 8f342a40e1d0dd45d7d77bb40382f7f9dfc04178..1425ae3810f3564b7b489dfa305aeb6fd5f74dc2 100644 (file)
@@ -47,7 +47,7 @@ static const struct mail_index_optimization_settings default_optimization_set =
        .cache = {
                .unaccessed_field_drop_secs = 3600 * 24 * 30,
                .record_max_size = 64 * 1024,
-               .max_size = (uint32_t)-1,
+               .max_size = 1024 * 1024 * 1024,
                .compress_min_size = 32 * 1024,
                .compress_delete_percentage = 20,
                .compress_continued_percentage = 200,