dovecot: Don't rebuild dbox if another process had done it alrea...

dovecot at dovecot.org dovecot at dovecot.org
Sun Dec 9 16:27:20 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/c8df2492959e
changeset: 6982:c8df2492959e
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Dec 09 16:27:17 2007 +0200
description:
Don't rebuild dbox if another process had done it already by the time we got
the mailbox locked.

diffstat:

1 file changed, 4 insertions(+)
src/lib-storage/index/dbox/dbox-sync.c |    4 ++++

diffs (14 lines):

diff -r 66b439e24c47 -r c8df2492959e src/lib-storage/index/dbox/dbox-sync.c
--- a/src/lib-storage/index/dbox/dbox-sync.c	Sun Dec 09 16:20:35 2007 +0200
+++ b/src/lib-storage/index/dbox/dbox-sync.c	Sun Dec 09 16:27:17 2007 +0200
@@ -317,6 +317,10 @@ int dbox_sync_begin(struct dbox_mailbox 
 			return ret;
 		}
 
+		if (rebuild && dbox_sync_want_flush_dirty(mbox, FALSE) >= 0) {
+			/* another process rebuilt it already */
+			rebuild = FALSE;
+		}
 		if (rebuild) {
 			ret = 0;
 			rebuild = FALSE;


More information about the dovecot-cvs mailing list