Mercurial > dovecot > core-2.2
changeset 21170:0edde4c50a1d
lib-index: mail_transaction_log_find_file() - remove wrong optimization.
When opening the index, it's possible that:
process A: .log is opened with seq=1
process B: Rotates the .log and writes a new dovecot.index with
log_file_seq=2
process A: dovecot.index is opened. mail_transaction_log_view_set() now
wants to file log_file_seq=2 with mail_transaction_log_find_file(), but
because open_count==0, the .log isn't refreshed.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 18 Nov 2016 16:27:33 +0200 |
parents | 3ebaf213e69c |
children | d3022316712b |
files | src/lib-index/mail-transaction-log.c |
diffstat | 1 files changed, 0 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log.c Fri Nov 18 16:15:59 2016 +0200 +++ b/src/lib-index/mail-transaction-log.c Fri Nov 18 16:27:33 2016 +0200 @@ -376,12 +376,6 @@ file exists. */ return 0; } - if (log->index->open_count == 0) { - /* we're opening the index and we just opened the - log file. don't waste time checking if there's a - newer one. */ - return 0; - } if (mail_transaction_log_refresh(log, FALSE) < 0) return -1;