dovecot: Removed extension intro caching, it doesn't currently w...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jul 17 21:30:36 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/99aace97fb4e
changeset: 6042:99aace97fb4e
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 17 21:30:33 2007 +0300
description:
Removed extension intro caching, it doesn't currently work right.

diffstat:

1 file changed, 3 insertions(+), 8 deletions(-)
src/lib-index/mail-transaction-log-append.c |   11 +++--------

diffs (42 lines):

diff -r f2ab0b7e5ae6 -r 99aace97fb4e src/lib-index/mail-transaction-log-append.c
--- a/src/lib-index/mail-transaction-log-append.c	Tue Jul 17 21:19:14 2007 +0300
+++ b/src/lib-index/mail-transaction-log-append.c	Tue Jul 17 21:30:33 2007 +0300
@@ -13,8 +13,6 @@ struct log_append_context {
 	struct mail_transaction_log_file *file;
 	struct mail_index_transaction *trans;
 	buffer_t *output;
-
-	uint32_t last_ext_id, last_reset_id;
 
 	uint32_t first_append_size;
 	bool sync_includes_this;
@@ -175,6 +173,8 @@ static void log_append_ext_intro(struct 
 	uint32_t idx;
 	unsigned int count;
 
+	i_assert(ext_id != (uint32_t)-1);
+
 	if (t->reset ||
 	    !mail_index_map_get_ext_idx(t->view->map, ext_id, &idx)) {
 		/* new extension */
@@ -224,11 +224,7 @@ static void log_append_ext_intro(struct 
 	if ((buf->used % 4) != 0)
 		buffer_append_zero(buf, 4 - (buf->used % 4));
 
-	if (ctx->last_ext_id != ext_id || intro->reset_id != ctx->last_reset_id)
-		log_append_buffer(ctx, buf, NULL, MAIL_TRANSACTION_EXT_INTRO);
-
-	ctx->last_ext_id = ext_id;
-	ctx->last_reset_id = intro->reset_id;
+	log_append_buffer(ctx, buf, NULL, MAIL_TRANSACTION_EXT_INTRO);
 }
 
 static void
@@ -492,7 +488,6 @@ mail_transaction_log_append_locked(struc
 	ctx.file = file;
 	ctx.trans = t;
 	ctx.output = buffer_create_dynamic(default_pool, 1024);
-	ctx.last_ext_id = (uint32_t)-1;
 
 	/* send all extension introductions and resizes before appends
 	   to avoid resize overhead as much as possible */


More information about the dovecot-cvs mailing list