[dovecot/core] 230586: lib-index: Make sure cache compression doesn't cle...

GitHub noreply at github.com
Mon May 23 20:30:10 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 230586a1660d3c09dc9becd0f77b683a81330720
      https://github.com/dovecot/core/commit/230586a1660d3c09dc9becd0f77b683a81330720
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M src/lib-index/mail-cache-compress.c

  Log Message:
  -----------
  lib-index: Make sure cache compression doesn't clear the file unneededly.

This probably never happened with current code, except when the cache file
was already broken.

mail_cache_compress() unmapped cache when map_with_read==TRUE, but we never
mapped it back. This would cause cache copying code to think cache was
unusable and not copy anything.


  Commit: 5b47087754f4008e88c93386d524e07db535c132
      https://github.com/dovecot/core/commit/5b47087754f4008e88c93386d524e07db535c132
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-05-23 (Mon, 23 May 2016)

  Changed paths:
    M src/lib-index/mail-cache-compress.c

  Log Message:
  -----------
  lib-index: Fixed assert-crash caused by previous cache compression change.

We can't call mail_cache_map() when cache file isn't open or we'll crash:

Panic: file mail-cache.c: line 468 (mail_cache_map): assertion failed: (cache->need_compress_file_seq != 0 || MAIL_INDEX_IS_IN_MEMORY(cache->index))


Compare: https://github.com/dovecot/core/compare/86c4dc012101...5b47087754f4


More information about the dovecot-cvs mailing list