changeset 3176:eec0c605e78f HEAD

We might have skipped transaction log records when syncing if log file was just rotated.
author Timo Sirainen <tss@iki.fi>
date Sat, 05 Mar 2005 21:11:19 +0200
parents 5d6656a798e5
children 95d2d8d5958b
files src/lib-index/mail-index-sync-update.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync-update.c	Sat Mar 05 21:08:34 2005 +0200
+++ b/src/lib-index/mail-index-sync-update.c	Sat Mar 05 21:11:19 2005 +0200
@@ -617,7 +617,10 @@
 			mail_transaction_log_view_get_prev_pos(view->log_view,
 							       &prev_seq,
 							       &prev_offset);
-			if (prev_offset < view->map->hdr.log_file_ext_offset) {
+			if (prev_seq < view->map->hdr.log_file_seq ||
+			    (prev_seq == view->map->hdr.log_file_seq &&
+			     prev_offset <
+			     view->map->hdr.log_file_ext_offset)) {
 				/* we have already synced this change */
 				continue;
 			}