dovecot-2.0: mdbox: Minor optimization for syncing expunges.

dovecot at dovecot.org dovecot at dovecot.org
Mon Apr 19 16:36:45 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/cf88ac9665f7
changeset: 11173:cf88ac9665f7
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Apr 19 16:36:42 2010 +0300
description:
mdbox: Minor optimization for syncing expunges.

diffstat:

 src/lib-storage/index/dbox-multi/mdbox-sync.c |  7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diffs (34 lines):

diff -r 4ee1d2312d83 -r cf88ac9665f7 src/lib-storage/index/dbox-multi/mdbox-sync.c
--- a/src/lib-storage/index/dbox-multi/mdbox-sync.c	Mon Apr 19 16:35:36 2010 +0300
+++ b/src/lib-storage/index/dbox-multi/mdbox-sync.c	Mon Apr 19 16:36:42 2010 +0300
@@ -26,8 +26,6 @@
 #include <stdlib.h>
 #include <dirent.h>
 
-#define DBOX_REBUILD_COUNT 3
-
 static int
 dbox_sync_verify_expunge_guid(struct mdbox_sync_context *ctx, uint32_t seq,
 			      const uint8_t guid_128[MAIL_GUID_128_SIZE])
@@ -56,20 +54,17 @@
 {
 	uint32_t map_uid;
 
-	if (seq_range_exists(&ctx->expunged_seqs, seq)) {
+	if (seq_range_array_add(&ctx->expunged_seqs, 0, seq)) {
 		/* already marked as expunged in this sync */
 		return 0;
 	}
 
 	if (dbox_sync_verify_expunge_guid(ctx, seq, guid_128) < 0)
 		return -1;
-
 	if (mdbox_mail_lookup(ctx->mbox, ctx->sync_view, seq, &map_uid) < 0)
 		return -1;
-
 	if (dbox_map_update_refcount(ctx->map_trans, map_uid, -1) < 0)
 		return -1;
-	seq_range_array_add(&ctx->expunged_seqs, 0, seq);
 	return 0;
 }
 


More information about the dovecot-cvs mailing list