dovecot-2.2: lib-storage: When doing a fast sync, refresh index ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 21 20:03:21 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/60b8746e6cfe
changeset: 16698:60b8746e6cfe
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 21 20:03:13 2013 +0300
description:
lib-storage: When doing a fast sync, refresh index to see if it had any changes.
I'm pretty sure this used to be done earlier, but probably some
optimizations dropped it at some point.

diffstat:

 src/lib-storage/index/index-sync.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 0d966f8d53be -r 60b8746e6cfe src/lib-storage/index/index-sync.c
--- a/src/lib-storage/index/index-sync.c	Wed Aug 21 19:40:54 2013 +0300
+++ b/src/lib-storage/index/index-sync.c	Wed Aug 21 20:03:13 2013 +0300
@@ -218,6 +218,11 @@
 			mail_index_view_get_messages_count(box->view);
 	}
 
+	if ((flags & MAILBOX_SYNC_FLAG_FAST) != 0) {
+		/* we most likely did a fast sync. refresh the index anyway in
+		   case there were some new changes. */
+		(void)mail_index_refresh(box->index);
+	}
 	ctx->sync_ctx = mail_index_view_sync_begin(box->view, sync_flags);
 	if ((flags & MAILBOX_SYNC_FLAG_NO_EXPUNGES) == 0) {
 		mail_index_view_sync_get_expunges(ctx->sync_ctx,


More information about the dovecot-cvs mailing list