[dovecot/core] 93cb78: lib-index: Add mail_cache_close_mail() to smartly ...

GitHub noreply at github.com
Mon Aug 21 10:00:10 EEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 93cb78fb1947d34e98efffecc2b73f035e711f18
      https://github.com/dovecot/core/commit/93cb78fb1947d34e98efffecc2b73f035e711f18
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-21 (Mon, 21 Aug 2017)

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

  Log Message:
  -----------
  lib-index: Add mail_cache_close_mail() to smartly drop cached data with INDEX=MEMORY

Instead of reseting the entire transaction buffer when 256 kB is reached,
just drop mails have have been marked closed with mail_cache_close_mail().
If that's not enough, continue deleting forcibly until the buffer is below
256 kB.

This is especially important when mail_prefetch_count>0 and INDEX=MEMORY.
In that case there can be multiple mails that are being added to cache
and used later on. If they were dropped from cache too early, the work
would have to be done all over again.


  Commit: c3fab8b44c2b1e5835b8f79bd7a783b781de2ef4
      https://github.com/dovecot/core/commit/c3fab8b44c2b1e5835b8f79bd7a783b781de2ef4
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-21 (Mon, 21 Aug 2017)

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

  Log Message:
  -----------
  lib-storage: Call mail_cache_close_mail() when mail is closed

Fixes caching problems with INDEX=MEMORY


Compare: https://github.com/dovecot/core/compare/351233c81011...c3fab8b44c2b


More information about the dovecot-cvs mailing list