dovecot-2.2: lib-index: Don't unnecessarily update dovecot.index...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Feb 24 11:58:58 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/76f576fc28dc
changeset: 15905:76f576fc28dc
user: Timo Sirainen <tss at iki.fi>
date: Sun Feb 24 10:49:38 2013 +0200
description:
lib-index: Don't unnecessarily update dovecot.index again after log rotation.
diffstat:
src/lib-index/mail-index-sync.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r d3cf06639864 -r 76f576fc28dc src/lib-index/mail-index-sync.c
--- a/src/lib-index/mail-index-sync.c Sun Feb 24 09:16:31 2013 +0200
+++ b/src/lib-index/mail-index-sync.c Sun Feb 24 10:49:38 2013 +0200
@@ -760,6 +760,11 @@
{
uint32_t log_diff;
+ if (index->last_read_log_file_seq != index->map->hdr.log_file_seq) {
+ /* we recently just rotated the log and rewrote index */
+ return FALSE;
+ }
+
log_diff = index->map->hdr.log_file_tail_offset -
index->last_read_log_file_tail_offset;
if (log_diff > MAIL_INDEX_MAX_WRITE_BYTES ||
More information about the dovecot-cvs
mailing list