dovecot: Refresh index always after committing a transaction. Th...

dovecot at dovecot.org dovecot at dovecot.org
Fri Nov 2 16:33:48 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/b8f2fade7aeb
changeset: 6656:b8f2fade7aeb
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Nov 02 16:33:41 2007 +0200
description:
Refresh index always after committing a transaction. This is especially
useful now that we don't always bother to sync the mailbox after a commit.

diffstat:

1 file changed, 5 insertions(+)
src/lib-index/mail-index-transaction.c |    5 +++++

diffs (15 lines):

diff -r 9ffa528c257c -r b8f2fade7aeb src/lib-index/mail-index-transaction.c
--- a/src/lib-index/mail-index-transaction.c	Fri Nov 02 16:32:31 2007 +0200
+++ b/src/lib-index/mail-index-transaction.c	Fri Nov 02 16:33:41 2007 +0200
@@ -544,6 +544,11 @@ static int mail_index_transaction_commit
 	else {
 		ret = mail_transaction_log_append(t, log_file_seq_r,
 						  log_file_offset_r);
+	}
+
+	if (ret == 0) {
+		/* we always want to have the latest changes in index map */
+		(void)mail_index_refresh(t->view->index);
 	}
 
 	mail_index_transaction_unref(&t);


More information about the dovecot-cvs mailing list