]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-index: mail_index_sync_map() - Don't try to-resync extension updates
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 29 Apr 2018 09:31:23 +0000 (12:31 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 30 Apr 2018 12:47:08 +0000 (15:47 +0300)
commit3a31823cdb17aaf1d6704930f8f1392e12756198
treebc704570ae101b1b1265db66c521501792bb8e2c
parent0aaf09c7e2653110a026982e73f50c56869dbeed
lib-index: mail_index_sync_map() - Don't try to-resync extension updates

This was done to call extension record sync handlers, but the previous
commit removes them. Fixes a problem where obsolete cache offsets were
used in some situations:

 - Some cache updates are from external transactions and some are from
non-external transactions. This is because cache offset updates are being
added by whatever the parent index transaction is.

 - When mail_index_sync_map() is mapping MAIL_INDEX_SYNC_HANDLER_FILE, it
has already synced the map. But it's calling mail_index_sync_record()
for non-external transactions to call expunge handlers and extension
update handlers. It's calling the regular mail_index_sync_record() to do
this work.

 - But mail_index_sync_record() is actually still updating the map. So now
mail_index_sync_record() is called for all non-external cache updates,
but not for external cache updates! And since these are somewhat
randomly either external or non-external, the end result is that the
cache offset may be obsolete.
src/lib-index/mail-index-sync-update.c